revert svg for windows

This commit is contained in:
Marcos Pinto 2007-12-03 18:10:15 +00:00
parent b4795cc362
commit db80d433b6
2 changed files with 16 additions and 7 deletions

View File

@ -146,7 +146,11 @@ def get_pixmap(fname):
def get_logo(size): def get_logo(size):
import gtk 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) size, size)
def open_url_in_browser(link): def open_url_in_browser(link):

View File

@ -45,7 +45,8 @@ class PreferencesDlg:
if plugin_tab: if plugin_tab:
self.glade.get_widget("notebook").set_current_page(6) self.glade.get_widget("notebook").set_current_page(6)
self.dialog.set_position(gtk.WIN_POS_CENTER) 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({ self.glade.signal_autoconnect({
'toggle_ui': self.toggle_ui, 'toggle_ui': self.toggle_ui,
'on_btn_testport_clicked': self.TestPort, 'on_btn_testport_clicked': self.TestPort,
@ -400,7 +401,8 @@ class MergeDlg:
domain='deluge') domain='deluge')
self.dialog = self.glade.get_widget("merge_dialog") self.dialog = self.glade.get_widget("merge_dialog")
self.dialog.set_position(gtk.WIN_POS_CENTER) 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): def show(self, window):
self.dialog.set_transient_for(window) self.dialog.set_transient_for(window)
@ -416,7 +418,9 @@ class FilesDlg:
domain='deluge') domain='deluge')
self.dialog = self.glade.get_widget("file_dialog") self.dialog = self.glade.get_widget("file_dialog")
self.dialog.set_position(gtk.WIN_POS_CENTER) 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.files_manager = files.FilesDialogManager(
self.glade.get_widget("file_view"), self.glade.get_widget("file_view"),
dumped_torrent) 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_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("http://deluge-torrent.org")
abt.set_website_label("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( abt.set_logo(gtk.gdk.pixbuf_new_from_file(
common.get_pixmap("deluge-about.png"))) common.get_pixmap("deluge-about.png")))
abt.show_all() 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.set_current_folder(config.get("open_torrent_dialog_path"))
chooser.add_filter(f1) chooser.add_filter(f1)
chooser.set_select_multiple(True) chooser.set_select_multiple(True)
chooser.set_icon(common.get_logo(32))
if not common.windows_check(): if not common.windows_check():
chooser.set_icon(common.get_logo(32))
chooser.set_property("skip-taskbar-hint", True) chooser.set_property("skip-taskbar-hint", True)
response = chooser.run() response = chooser.run()
@ -524,8 +529,8 @@ def show_file_open_dialog(parent, title=None):
def show_directory_chooser_dialog(parent, title): def show_directory_chooser_dialog(parent, title):
chooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, chooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) 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(): if not common.windows_check():
chooser.set_icon(common.get_logo(32))
chooser.set_property("skip-taskbar-hint", True) chooser.set_property("skip-taskbar-hint", True)
config = pref.Preferences() config = pref.Preferences()
chooser.set_current_folder(config.get("choose_directory_dialog_path")) chooser.set_current_folder(config.get("choose_directory_dialog_path"))