From 3136e5490f88e42c55096a80d66dda9340d73087 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 29 Nov 2009 00:52:00 +0000 Subject: [PATCH] Add some checks for OSX since it doesn't support SVG icons --- deluge/ui/gtkui/common.py | 4 ++-- deluge/ui/gtkui/new_release_dialog.py | 2 +- deluge/ui/gtkui/systemtray.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/gtkui/common.py b/deluge/ui/gtkui/common.py index aceee3679..66327c8c5 100644 --- a/deluge/ui/gtkui/common.py +++ b/deluge/ui/gtkui/common.py @@ -50,7 +50,7 @@ import deluge.common def get_logo(size): """Returns a deluge logo pixbuf based on the size parameter.""" - if deluge.common.windows_check(): + if deluge.common.windows_check() or deluge.common.osx_check(): return gtk.gdk.pixbuf_new_from_file_at_size(deluge.common.get_pixmap("deluge.png"), \ size, size) else: @@ -162,7 +162,7 @@ def show_other_dialog(header, type_str, image_stockid=None, image_filename=None, glade.get_widget("image").set_from_stock(image_stockid, gtk.ICON_SIZE_LARGE_TOOLBAR) if image_filename: # Hack for Windows since it doesn't support svg - if os.path.splitext(image_filename)[1] == ".svg" and deluge.common.windows_check(): + if os.path.splitext(image_filename)[1] == ".svg" and (deluge.common.windows_check() or deluge.common.osx_check()): image_filename = os.path.splitext(image_filename)[0] + "16.png" pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( deluge.common.get_pixmap(image_filename), 32, 32) diff --git a/deluge/ui/gtkui/new_release_dialog.py b/deluge/ui/gtkui/new_release_dialog.py index 76aff5e3c..5561edfc3 100644 --- a/deluge/ui/gtkui/new_release_dialog.py +++ b/deluge/ui/gtkui/new_release_dialog.py @@ -47,7 +47,7 @@ class NewReleaseDialog: glade = component.get("MainWindow").main_glade self.dialog = glade.get_widget("new_release_dialog") # Set the version labels - if deluge.common.windows_check(): + if deluge.common.windows_check() or deluge.common.osx_check(): glade.get_widget("image_new_release").set_from_file( deluge.common.get_pixmap("deluge16.png")) else: diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py index 6ccfeb332..ee1f25fd2 100644 --- a/deluge/ui/gtkui/systemtray.py +++ b/deluge/ui/gtkui/systemtray.py @@ -82,7 +82,7 @@ class SystemTray(component.Component): pkg_resources.resource_filename("deluge.ui.gtkui", "glade/tray_menu.glade")) - if deluge.common.windows_check(): + if deluge.common.windows_check() or deluge.common.osx_check(): self.tray = gtk.status_icon_new_from_pixbuf( common.get_logo(32)) else: