From db80d433b6671301254ddf98ae76c646fdefa3f8 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Mon, 3 Dec 2007 18:10:15 +0000 Subject: [PATCH] revert svg for windows --- src/common.py | 6 +++++- src/dialogs.py | 17 +++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/common.py b/src/common.py index 0756e3838..b41591357 100644 --- a/src/common.py +++ b/src/common.py @@ -146,7 +146,11 @@ def get_pixmap(fname): def get_logo(size): import gtk - return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), \ + if windows_check(): + return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.png"), \ + size, size) + else: + return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), \ size, size) def open_url_in_browser(link): diff --git a/src/dialogs.py b/src/dialogs.py index fccdca76a..42054c980 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -45,7 +45,8 @@ class PreferencesDlg: if plugin_tab: self.glade.get_widget("notebook").set_current_page(6) self.dialog.set_position(gtk.WIN_POS_CENTER) - self.dialog.set_icon(common.get_logo(32)) + if not common.windows_check(): + self.dialog.set_icon(common.get_logo(32)) self.glade.signal_autoconnect({ 'toggle_ui': self.toggle_ui, 'on_btn_testport_clicked': self.TestPort, @@ -400,7 +401,8 @@ class MergeDlg: domain='deluge') self.dialog = self.glade.get_widget("merge_dialog") self.dialog.set_position(gtk.WIN_POS_CENTER) - self.dialog.set_icon(common.get_logo(32)) + if not common.windows_check(): + self.dialog.set_icon(common.get_logo(32)) def show(self, window): self.dialog.set_transient_for(window) @@ -416,7 +418,9 @@ class FilesDlg: domain='deluge') self.dialog = self.glade.get_widget("file_dialog") self.dialog.set_position(gtk.WIN_POS_CENTER) - self.dialog.set_icon(common.get_logo(32)) + if not common.windows_check(): + self.dialog.set_icon(common.get_logo(32)) + self.files_manager = files.FilesDialogManager( self.glade.get_widget("file_view"), dumped_torrent) @@ -456,7 +460,8 @@ def show_about_dialog(window): abt.set_license(_("Deluge is free software, you can redistribute it and/or\nmodify it under the terms of the GNU General Public\n License as published by the Free Software Foundation,\neither version 2 of the License, or (at your option) any\nlater version. Deluge is distributed in the hope that it\nwill be useful, but WITHOUT ANY WARRANTY, without even \nthe implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details. You should have received\na copy of the GNU General Public License along with\nDeluge, but if not, write to the Free Software Foundation,\n Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-\n1301 USA")) abt.set_website("http://deluge-torrent.org") abt.set_website_label("http://deluge-torrent.org") - abt.set_icon(common.get_logo(32)) + if not common.windows_check(): + abt.set_icon(common.get_logo(32)) abt.set_logo(gtk.gdk.pixbuf_new_from_file( common.get_pixmap("deluge-about.png"))) abt.show_all() @@ -508,8 +513,8 @@ def show_file_open_dialog(parent, title=None): chooser.set_current_folder(config.get("open_torrent_dialog_path")) chooser.add_filter(f1) chooser.set_select_multiple(True) - chooser.set_icon(common.get_logo(32)) if not common.windows_check(): + chooser.set_icon(common.get_logo(32)) chooser.set_property("skip-taskbar-hint", True) response = chooser.run() @@ -524,8 +529,8 @@ def show_file_open_dialog(parent, title=None): def show_directory_chooser_dialog(parent, title): chooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) - chooser.set_icon(common.get_logo(32)) if not common.windows_check(): + chooser.set_icon(common.get_logo(32)) chooser.set_property("skip-taskbar-hint", True) config = pref.Preferences() chooser.set_current_folder(config.get("choose_directory_dialog_path"))