pulseaudio-equalizer/0005-window-icon.patch

25 lines
1.3 KiB
Diff

--- 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()