summaryrefslogtreecommitdiff
path: root/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-window-icon.patch
blob: d986f114ccf9a1226cbb8753c6d319c21e1f1d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()