mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 20:14:51 +00:00
windows now supports svg icons
This commit is contained in:
parent
d849684e8b
commit
b4795cc362
2 changed files with 7 additions and 16 deletions
|
@ -146,11 +146,7 @@ def get_pixmap(fname):
|
|||
|
||||
def get_logo(size):
|
||||
import gtk
|
||||
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"), \
|
||||
return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), \
|
||||
size, size)
|
||||
|
||||
def open_url_in_browser(link):
|
||||
|
|
|
@ -45,8 +45,7 @@ class PreferencesDlg:
|
|||
if plugin_tab:
|
||||
self.glade.get_widget("notebook").set_current_page(6)
|
||||
self.dialog.set_position(gtk.WIN_POS_CENTER)
|
||||
if not common.windows_check():
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
self.glade.signal_autoconnect({
|
||||
'toggle_ui': self.toggle_ui,
|
||||
'on_btn_testport_clicked': self.TestPort,
|
||||
|
@ -401,8 +400,7 @@ class MergeDlg:
|
|||
domain='deluge')
|
||||
self.dialog = self.glade.get_widget("merge_dialog")
|
||||
self.dialog.set_position(gtk.WIN_POS_CENTER)
|
||||
if not common.windows_check():
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
|
||||
def show(self, window):
|
||||
self.dialog.set_transient_for(window)
|
||||
|
@ -418,9 +416,7 @@ class FilesDlg:
|
|||
domain='deluge')
|
||||
self.dialog = self.glade.get_widget("file_dialog")
|
||||
self.dialog.set_position(gtk.WIN_POS_CENTER)
|
||||
if not common.windows_check():
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
|
||||
self.dialog.set_icon(common.get_logo(32))
|
||||
self.files_manager = files.FilesDialogManager(
|
||||
self.glade.get_widget("file_view"),
|
||||
dumped_torrent)
|
||||
|
@ -460,8 +456,7 @@ 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")
|
||||
if not common.windows_check():
|
||||
abt.set_icon(common.get_logo(32))
|
||||
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()
|
||||
|
@ -513,8 +508,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()
|
||||
|
@ -529,8 +524,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"))
|
||||
|
|
Loading…
Add table
Reference in a new issue