summaryrefslogtreecommitdiff
path: root/pcr/pulseaudio-equalizer-ladspa
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 14:13:07 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 14:28:45 -0300
commit2d45a03fd5536329f6b3545aa82f66c5cf0c8c71 (patch)
tree45409e567e78644cbba6e7ad2be1057345513579 /pcr/pulseaudio-equalizer-ladspa
parentaa35f60a34268a23f778b7cbd934b1b52df78c8c (diff)
downloadabslibre-2d45a03fd5536329f6b3545aa82f66c5cf0c8c71.tar.gz
abslibre-2d45a03fd5536329f6b3545aa82f66c5cf0c8c71.tar.bz2
abslibre-2d45a03fd5536329f6b3545aa82f66c5cf0c8c71.zip
pulseaudio-equalizer-ladspa: add new package to [pcr] -> https://labs.parabola.nu/issues/916
Diffstat (limited to 'pcr/pulseaudio-equalizer-ladspa')
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/PKGBUILD44
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch11
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch17
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-force-default-persistence-value.patch14
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-pulse-path.patch161
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-remove-preamp.patch32
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-window-icon.patch24
7 files changed, 303 insertions, 0 deletions
diff --git a/pcr/pulseaudio-equalizer-ladspa/PKGBUILD b/pcr/pulseaudio-equalizer-ladspa/PKGBUILD
new file mode 100644
index 000000000..6649b6517
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer (Arch): Yiyo <vespinosa2000@yahoo.com>
+pkgname=pulseaudio-equalizer-ladspa
+pkgver=2.7.0.2
+pkgrel=4
+pkgdesc="A 15-band equalizer for PulseAudio"
+arch=(i686 x86_64)
+url="http://www.webupd8.org/2013/10/system-wide-pulseaudio-equalizer.html"
+license=('GPL3')
+depends=('pygtk' 'swh-plugins' 'gnome-icon-theme' 'pulseaudio' 'bc')
+source=(http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/pulseaudio-equalizer/pulseaudio-equalizer_$pkgver.orig.tar.gz
+ pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch
+ pulseaudio-equalizer-2.7-force-default-persistence-value.patch
+ pulseaudio-equalizer-2.7-remove-preamp.patch
+ pulseaudio-equalizer-2.7-window-icon.patch
+ pulseaudio-equalizer-2.7-pulse-path.patch
+ pulseaudio-equalizer-2.7-current-volume.patch)
+md5sums=('c3c886a6017cb16408d47d0f5cd8549b'
+ 'ab6578d8e9528e1fc78f461a9842760d'
+ '141a6d70f57938b71fb0bac0d3df9fb1'
+ '0df0fa924165601f8703f13052a63456'
+ '6d132c5b5d71a985fb2aa98aa93cf190'
+ 'abb24625bb9e2e5d77f21d8d9148cb26'
+ '917b144f7789ceef42980e0b816f101d')
+
+build() {
+ cd "$srcdir/pulseaudio-equalizer"
+
+ sed -i 's|gnome-volume-control|multimedia-volume-control|g' usr/share/applications/pulseaudio-equalizer.desktop
+
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-force-default-persistence-value.patch"
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-remove-preamp.patch"
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-window-icon.patch"
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch"
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-pulse-path.patch"
+ patch -Np1 -i "$srcdir/pulseaudio-equalizer-2.7-current-volume.patch"
+
+ sed -i '1s|#!/usr/bin/env python|&2|' usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py
+ sed -i 's|^python|&2|' usr/bin/pulseaudio-equalizer-gtk
+}
+
+package() {
+ cd "$srcdir/pulseaudio-equalizer"
+ cp -rfp usr "$pkgdir"
+}
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch
new file mode 100644
index 000000000..7fb916e3e
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch
@@ -0,0 +1,11 @@
+--- pulseaudio-equalizer.orig/usr/bin/pulseaudio-equalizer 2014-10-29 15:24:20.000000000 -0500
++++ pulseaudio-equalizer/usr/bin/pulseaudio-equalizer 2015-01-14 23:11:42.872261394 -0500
+@@ -109,7 +109,7 @@
+ # Get sink names and volumes
+ PA_LADSPA_SINK="ladspa_output.$PA_LADSPA_PLUGIN.$PA_LADSPA_LABEL"
+ PA_CURRENT_SINK=$(pacmd stat | grep "Default sink name" | sed 's/Default sink name: //g')
+-PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: 0:' | awk '{print $NF}' | sed 's/%//g')
++PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left:' | awk '{sub(/%/,"",$5); print $5}' | awk '{sub(/,/,"",$1); print $1}')
+ PA_REAL_VOLUME=$((PA_CURRENT_VOLUME*65536/100))
+ PA_REAL_PREAMP_FLOAT=$(echo "$PA_PREAMP*65536" | bc)
+ PA_REAL_PREAMP=${PA_REAL_PREAMP_FLOAT/\.*}
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch
new file mode 100644
index 000000000..eed743cc3
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-do-not-crash-on-missing-preset.patch
@@ -0,0 +1,17 @@
+--- pulseaudio-equalizer.orig/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2011-03-17 10:53:48.000000000 +0000
++++ pulseaudio-equalizer/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2011-03-17 11:18:04.000000000 +0000
+@@ -180,10 +180,13 @@ class Equalizer:
+ if os.path.isfile(presetdir1 + "/" + preset + ".preset"):
+ f = open(presetdir1 + "/" + preset + ".preset", "r")
+ rawdata=f.read().split('\n')
+- else:
++ f.close
++ elif os.path.isfile(presetdir2 + "/" + preset + ".preset"):
+ f = open(presetdir2 + "/" + preset + ".preset", "r")
+ rawdata=f.read().split('\n')
+ f.close
++ else:
++ print "Can't find %s preset" % preset
+
+ ladspa_filename = str(rawdata[0])
+ ladspa_name = str(rawdata[1])
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-force-default-persistence-value.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-force-default-persistence-value.patch
new file mode 100644
index 000000000..aeff7ea5f
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-force-default-persistence-value.patch
@@ -0,0 +1,14 @@
+--- pulseaudio-equalizer.orig/usr/bin/pulseaudio-equalizer
++++ pulseaudio-equalizer/usr/bin/pulseaudio-equalizer
+@@ -128,7 +128,9 @@
+ if [ -f $HOME/.config/pulse/default.pa ]; then
+ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+ PA_EQUALIZER_PERSISTENCE=1
+- fi
++ else
++ PA_EQUALIZER_PERSISTENCE=0
++ fi
+ else
+ PA_EQUALIZER_PERSISTENCE=0
+ fi
+
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-pulse-path.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-pulse-path.patch
new file mode 100644
index 000000000..3326aa160
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-pulse-path.patch
@@ -0,0 +1,161 @@
+--- pulseaudio-equalizer.orig/usr/bin/pulseaudio-equalizer 2013-10-24 10:23:27.000000000 +0000
++++ pulseaudio-equalizer/usr/bin/pulseaudio-equalizer 2013-10-24 10:53:48.000000000 +0000
+@@ -18,11 +18,11 @@
+ PA_PREAMP="1.0"
+ PA_CURRENT_PRESET=""
+
+-PRESET_DIR1=$HOME/.pulse/presets
++PRESET_DIR1=$HOME/.config/pulse/presets
+ PRESET_DIR2=/usr/share/pulseaudio-equalizer/presets
+ SCRIPT_NAME=pulseaudio-equalizer
+ SCRIPT_VERSION="2.7 (05/02/2010)"
+-CONFIG_NAME=$HOME/.pulse/equalizerrc
++CONFIG_NAME=$HOME/.config/pulse/equalizerrc
+ LOG_NAME=$HOME/Desktop/pulseaudio-equalizer.log
+
+ # Don't execute the script with elevated privileges
+@@ -125,8 +125,8 @@
+ fi
+
+ # Check if equalizer is set as persistent
+-if [ -f $HOME/.pulse/default.pa ]; then
+- if [ "$(cat $HOME/.pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
++if [ -f $HOME/.config/pulse/default.pa ]; then
++ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+ PA_EQUALIZER_PERSISTENCE=1
+ fi
+ else
+@@ -204,8 +204,8 @@
+ echo PA_PREAMP=$PA_PREAMP
+ echo PA_REAL_PREAMP=$PA_REAL_PREAMP
+
+- if [ -f $HOME/.pulse/default.pa ]; then
+- tail -n7 $HOME/.pulse/default.pa
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ tail -n7 $HOME/.config/pulse/default.pa
+ fi
+
+ echo "---"
+@@ -253,24 +253,24 @@
+ echo "-------------------------------------"
+
+ # If equalizer configuration is already set, delete file
+- if [ -f $HOME/.pulse/default.pa ]; then
+- if [ "$(cat $HOME/.pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+- echo "Equalizer definition detected in file '$HOME/.pulse/default.pa', deleting..."
+- rm $HOME/.pulse/default.pa
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
++ echo "Equalizer definition detected in file '$HOME/.config/pulse/default.pa', deleting..."
++ rm $HOME/.config/pulse/default.pa
+ fi
+ fi
+
+ # Make a backup of configuration if necessary
+- if [ -f $HOME/.pulse/default.pa ]; then
+- echo "Found '$HOME/.pulse/default.pa', making a copy..."
+- cp $HOME/.pulse/default.pa $HOME/.pulse/default.pa.noeq
+- CFG_SOURCE_FILE="$HOME/.pulse/default.pa.noeq"
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ echo "Found '$HOME/.config/pulse/default.pa', making a copy..."
++ cp $HOME/.config/pulse/default.pa $HOME/.config/pulse/default.pa.noeq
++ CFG_SOURCE_FILE="$HOME/.config/pulse/default.pa.noeq"
+ fi
+
+ # Decide which file to use as the configuration source
+- if [ -f $HOME/.pulse/default.pa.noeq ]; then
+- echo "Found '$HOME/.pulse/default.pa.noeq'..."
+- CFG_SOURCE_FILE="$HOME/.pulse/default.pa.noeq"
++ if [ -f $HOME/.config/pulse/default.pa.noeq ]; then
++ echo "Found '$HOME/.config/pulse/default.pa.noeq'..."
++ CFG_SOURCE_FILE="$HOME/.config/pulse/default.pa.noeq"
+ else
+ CFG_SOURCE_FILE="/etc/pulse/default.pa"
+ fi
+@@ -278,19 +278,19 @@
+ echo "Using configuration file '$CFG_SOURCE_FILE' as source..."
+
+ # Modify module-stream-restore line to disable cached sinks
+- cat $CFG_SOURCE_FILE | sed 's/load-module module-stream-restore/load-module module-stream-restore restore_device=false/g' >$HOME/.pulse/default.pa
++ cat $CFG_SOURCE_FILE | sed 's/load-module module-stream-restore/load-module module-stream-restore restore_device=false/g' >$HOME/.config/pulse/default.pa
+
+ # Add module-ladspa-sink definition
+- echo "" >>$HOME/.pulse/default.pa
+- echo "### BEGIN: Equalized audio configuration" >>$HOME/.pulse/default.pa
+- echo "### Generated from: $SCRIPT_NAME" >>$HOME/.pulse/default.pa
+- echo "load-module module-ladspa-sink sink_name=$PA_LADSPA_SINK master=$PA_MASTER_SINK plugin=$PA_LADSPA_PLUGIN label=$PA_LADSPA_LABEL control=$PA_LADSPA_CONTROLS" >>$HOME/.pulse/default.pa
++ echo "" >>$HOME/.config/pulse/default.pa
++ echo "### BEGIN: Equalized audio configuration" >>$HOME/.config/pulse/default.pa
++ echo "### Generated from: $SCRIPT_NAME" >>$HOME/.config/pulse/default.pa
++ echo "load-module module-ladspa-sink sink_name=$PA_LADSPA_SINK master=$PA_MASTER_SINK plugin=$PA_LADSPA_PLUGIN label=$PA_LADSPA_LABEL control=$PA_LADSPA_CONTROLS" >>$HOME/.config/pulse/default.pa
+
+ # Set LADSPA sink as default sink & set appropriate master sink (preamp) volume
+- echo "set-default-sink $PA_LADSPA_SINK" >>$HOME/.pulse/default.pa
+- echo "set-sink-volume $PA_MASTER_SINK $PA_REAL_PREAMP" >>$HOME/.pulse/default.pa
+- echo "set-sink-mute $PA_MASTER_SINK 0" >>$HOME/.pulse/default.pa
+- echo "### END: Equalized audio configuration" >>$HOME/.pulse/default.pa
++ echo "set-default-sink $PA_LADSPA_SINK" >>$HOME/.config/pulse/default.pa
++ echo "set-sink-volume $PA_MASTER_SINK $PA_REAL_PREAMP" >>$HOME/.config/pulse/default.pa
++ echo "set-sink-mute $PA_MASTER_SINK 0" >>$HOME/.config/pulse/default.pa
++ echo "### END: Equalized audio configuration" >>$HOME/.config/pulse/default.pa
+
+ echo "Equalizer setting saved (enable-config)."
+ echo "-------------------------------------"
+@@ -306,16 +306,16 @@
+ echo "-------------------------------------"
+
+ # Move .noeq configuration file if it exists
+- if [ -f $HOME/.pulse/default.pa.noeq ]; then
+- echo "Found '$HOME/.pulse/default.pa.noeq', moving..."
+- mv $HOME/.pulse/default.pa.noeq $HOME/.pulse/default.pa
++ if [ -f $HOME/.config/pulse/default.pa.noeq ]; then
++ echo "Found '$HOME/.config/pulse/default.pa.noeq', moving..."
++ mv $HOME/.config/pulse/default.pa.noeq $HOME/.config/pulse/default.pa
+ fi
+
+ # If equalizer configuration is present, delete file
+- if [ -f $HOME/.pulse/default.pa ]; then
+- if [ "$(cat $HOME/.pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+- echo "Equalizer definition detected, deleting '$HOME/.pulse/default.pa'..."
+- rm $HOME/.pulse/default.pa
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
++ echo "Equalizer definition detected, deleting '$HOME/.config/pulse/default.pa'..."
++ rm $HOME/.config/pulse/default.pa
+ fi
+ fi
+
+@@ -426,8 +426,8 @@
+ echo "-------------------------------------"
+ echo "Equalizer status: [enabled]"
+
+- if [ -f $HOME/.pulse/default.pa ]; then
+- if [ "$(cat $HOME/.pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+ echo "Equalizer configuration status: [enabled]"
+ else
+ echo "Equalizer configuration status: [disabled]"
+@@ -448,8 +448,8 @@
+ echo "-------------------------------------"
+ echo "Equalizer status: [disabled]"
+
+- if [ -f $HOME/.pulse/default.pa ]; then
+- if [ "$(cat $HOME/.pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
++ if [ -f $HOME/.config/pulse/default.pa ]; then
++ if [ "$(cat $HOME/.config/pulse/default.pa | grep -m1 "### BEGIN: Equalized audio configuration")" = "### BEGIN: Equalized audio configuration" ]; then
+ echo "Equalizer configuration status: [enabled]"
+ echo "Equalizer plugin: [$PA_LADSPA_PLUGIN/$PA_LADSPA_LABEL]"
+ echo "Equalizer control: [$PA_LADSPA_CONTROLS]"
+
+--- pulseaudio-equalizer.orig/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2013-10-24 10:23:27.000000000 +0000
++++ pulseaudio-equalizer/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2013-10-24 10:53:48.000000000 +0000
+@@ -13,7 +13,7 @@
+ import gtk, gobject
+ import os
+
+-configdir = os.getenv('HOME') + "/.pulse"
++configdir = os.getenv('HOME') + "/.config/pulse"
+ eqconfig = configdir + "/equalizerrc"
+ eqconfig2 = configdir + "/equalizerrc.test"
+ eqpresets = eqconfig + ".availablepresets"
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-remove-preamp.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-remove-preamp.patch
new file mode 100644
index 000000000..40d21582b
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-remove-preamp.patch
@@ -0,0 +1,32 @@
+--- pulseaudio-equalizer.orig/usr/bin/pulseaudio-equalizer
++++ pulseaudio-equalizer/usr/bin/pulseaudio-equalizer
+@@ -378,7 +378,7 @@
+
+ # Unmute & set preamp level on ALSA sink (as LADSPA sink will act as primary volume control)
+ echo "Setting ALSA sink ($PA_MASTER_SINK) preamp ("$PA_PREAMP"x)..."
+- echo >>/tmp/eqcommands.sh "set-sink-volume $PA_MASTER_SINK $PA_REAL_PREAMP"
++ #echo >>/tmp/eqcommands.sh "set-sink-volume $PA_MASTER_SINK $PA_REAL_PREAMP"
+ echo >>/tmp/eqcommands.sh "set-sink-mute $PA_MASTER_SINK 0"
+
+ # Set the LADSPA sink as the default
+--- pulseaudio-equalizer.orig/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py
++++ pulseaudio-equalizer/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py
+@@ -412,14 +412,14 @@
+ table.attach(label, 1, 2, 0, 1)
+ table.attach(preampscale, 1, 2, 1, 2)
+ table.attach(preampscalevalue, 1, 2, 2, 3)
+- label.show()
+- preampscale.show()
+- preampscalevalue.show()
++ #label.show()
++ #preampscale.show()
++ #preampscalevalue.show()
+
+ # Separator between preamp and bands
+ separator = gtk.VSeparator()
+ table.attach(separator, 2, 3, 1, 2)
+- separator.show()
++ #separator.show()
+
+ # Equalizer bands
+ global scale
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-window-icon.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-window-icon.patch
new file mode 100644
index 000000000..d986f114c
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-window-icon.patch
@@ -0,0 +1,24 @@
+--- pulseaudio-equalizer.orig/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2011-03-17 10:23:27.000000000 +0000
++++ pulseaudio-equalizer/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py 2011-03-17 10:53:48.000000000 +0000
+@@ -359,7 +359,20 @@ class Equalizer:
+ self.window.connect("destroy", self.destroy_equalizer)
+ self.window.set_title(windowtitle + " [" + realstatus + "]")
+ self.window.set_border_width(0)
+- icon = self.window.set_icon_from_file("/usr/share/icons/hicolor/scalable/apps/multimedia-volume-control.svg")
++
++ icon_theme = gtk.icon_theme_get_default()
++ icon_theme = gtk.icon_theme_get_default()
++ if icon_theme.has_icon("multimedia-volume-control"):
++ icon = icon_theme.load_icon("multimedia-volume-control", 16, 0)
++ self.window.set_icon(icon)
++ elif icon_theme.has_icon("gnome-volume-control"):
++ icon = icon_theme.load_icon("gnome-volume-control",16,0)
++ self.window.set_icon(icon)
++ elif icon_theme.has_icon("stock_volume"):
++ icon = icon_theme.load_icon("stock_volume",16,0)
++ self.window.set_icon(icon)
++ else:
++ print ("No icon found, window will be iconless")
+
+ menu = gtk.Menu()
+