pulseaudio-equalizer/0005-window-icon.patch

24 lines
1.1 KiB
Diff

--- a/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py
+++ b/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py
@@ -364,7 +364,19 @@ 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()
+ 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()