From 5afeabd56de3a35e6cc23847b1b5dfad215245c5 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 19 May 2009 23:49:31 +0000 Subject: [PATCH] attempt to set the icon via the icon theme before falling back to the logo (as in the statusbar) --- deluge/ui/gtkui/mainwindow.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 329df84d6..a732654be 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -62,7 +62,15 @@ class MainWindow(component.Component): "glade/main_window.glade")) self.window = self.main_glade.get_widget("main_window") - self.window.set_icon(common.get_logo(32)) + + if deluge.common.windows_check(): + self.window.set_icon(common.get_logo(32)) + else: + try: + icon_theme = gtk.icon_theme_get_default() + self.window.set_icon(icon_theme.load_icon("deluge", 32, 0)) + except: + self.window.set_icon(common.get_logo(32)) self.vpaned = self.main_glade.get_widget("vpaned") # Load the window state