attempt to set the icon via the icon theme before falling back to the logo (as in the statusbar)

This commit is contained in:
Damien Churchill 2009-05-19 23:49:31 +00:00
parent 11351e1544
commit 5afeabd56d
1 changed files with 9 additions and 1 deletions

View File

@ -62,6 +62,14 @@ class MainWindow(component.Component):
"glade/main_window.glade")) "glade/main_window.glade"))
self.window = self.main_glade.get_widget("main_window") self.window = self.main_glade.get_widget("main_window")
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.window.set_icon(common.get_logo(32))
self.vpaned = self.main_glade.get_widget("vpaned") self.vpaned = self.main_glade.get_widget("vpaned")