diff --git a/createicons.sh b/createicons.sh new file mode 100755 index 000000000..cc3cd1d9c --- /dev/null +++ b/createicons.sh @@ -0,0 +1,5 @@ +#!/bin/bash +for size in 16 22 24 32 36 48 64 72 96 128 192 256; do mkdir -p icons/hicolor/\ +${size}x${size}/apps; rsvg-convert -w ${size} -h ${size} \ +-o icons/hicolor/${size}x${size}/apps/deluge.png pixmaps/deluge.svg; mkdir -p \ +icons/scalable/apps/; cp pixmaps/deluge.svg icons/scalable/apps/deluge.svg; done diff --git a/icons/hicolor/128x128/apps/deluge.png b/icons/hicolor/128x128/apps/deluge.png new file mode 100644 index 000000000..bd3f2b3cf Binary files /dev/null and b/icons/hicolor/128x128/apps/deluge.png differ diff --git a/icons/hicolor/16x16/apps/deluge.png b/icons/hicolor/16x16/apps/deluge.png new file mode 100644 index 000000000..7558aacf9 Binary files /dev/null and b/icons/hicolor/16x16/apps/deluge.png differ diff --git a/icons/hicolor/192x192/apps/deluge.png b/icons/hicolor/192x192/apps/deluge.png new file mode 100644 index 000000000..06e7105aa Binary files /dev/null and b/icons/hicolor/192x192/apps/deluge.png differ diff --git a/icons/hicolor/22x22/apps/deluge.png b/icons/hicolor/22x22/apps/deluge.png new file mode 100644 index 000000000..51187bdf4 Binary files /dev/null and b/icons/hicolor/22x22/apps/deluge.png differ diff --git a/icons/hicolor/24x24/apps/deluge.png b/icons/hicolor/24x24/apps/deluge.png new file mode 100644 index 000000000..31b14b443 Binary files /dev/null and b/icons/hicolor/24x24/apps/deluge.png differ diff --git a/icons/hicolor/256x256/apps/deluge.png b/icons/hicolor/256x256/apps/deluge.png new file mode 100644 index 000000000..04e650d0c Binary files /dev/null and b/icons/hicolor/256x256/apps/deluge.png differ diff --git a/icons/hicolor/32x32/apps/deluge.png b/icons/hicolor/32x32/apps/deluge.png new file mode 100644 index 000000000..a450a620b Binary files /dev/null and b/icons/hicolor/32x32/apps/deluge.png differ diff --git a/icons/hicolor/36x36/apps/deluge.png b/icons/hicolor/36x36/apps/deluge.png new file mode 100644 index 000000000..73ec3fb7f Binary files /dev/null and b/icons/hicolor/36x36/apps/deluge.png differ diff --git a/icons/hicolor/48x48/apps/deluge.png b/icons/hicolor/48x48/apps/deluge.png new file mode 100644 index 000000000..b4e1d7aa8 Binary files /dev/null and b/icons/hicolor/48x48/apps/deluge.png differ diff --git a/icons/hicolor/64x64/apps/deluge.png b/icons/hicolor/64x64/apps/deluge.png new file mode 100644 index 000000000..891781201 Binary files /dev/null and b/icons/hicolor/64x64/apps/deluge.png differ diff --git a/icons/hicolor/72x72/apps/deluge.png b/icons/hicolor/72x72/apps/deluge.png new file mode 100644 index 000000000..e1672809e Binary files /dev/null and b/icons/hicolor/72x72/apps/deluge.png differ diff --git a/icons/hicolor/96x96/apps/deluge.png b/icons/hicolor/96x96/apps/deluge.png new file mode 100644 index 000000000..19e65d940 Binary files /dev/null and b/icons/hicolor/96x96/apps/deluge.png differ diff --git a/icons/scalable/apps/deluge.svg b/icons/scalable/apps/deluge.svg new file mode 100644 index 000000000..69e59776d --- /dev/null +++ b/icons/scalable/apps/deluge.svg @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Internet Category + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + internet + tools + applications + category + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pixmaps/deluge.svg b/pixmaps/deluge.svg new file mode 100644 index 000000000..69e59776d --- /dev/null +++ b/pixmaps/deluge.svg @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Internet Category + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + internet + tools + applications + category + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pixmaps/deluge128.png b/pixmaps/deluge128.png deleted file mode 100644 index 840b96704..000000000 Binary files a/pixmaps/deluge128.png and /dev/null differ diff --git a/pixmaps/deluge192.png b/pixmaps/deluge192.png deleted file mode 100644 index 9491409d6..000000000 Binary files a/pixmaps/deluge192.png and /dev/null differ diff --git a/pixmaps/deluge22.png b/pixmaps/deluge22.png deleted file mode 100644 index 29319b3f3..000000000 Binary files a/pixmaps/deluge22.png and /dev/null differ diff --git a/pixmaps/deluge256.png b/pixmaps/deluge256.png deleted file mode 100644 index a57e7687b..000000000 Binary files a/pixmaps/deluge256.png and /dev/null differ diff --git a/pixmaps/deluge32.png b/pixmaps/deluge32.png deleted file mode 100644 index 723372764..000000000 Binary files a/pixmaps/deluge32.png and /dev/null differ diff --git a/pixmaps/deluge48.png b/pixmaps/deluge48.png deleted file mode 100644 index d1de30a5d..000000000 Binary files a/pixmaps/deluge48.png and /dev/null differ diff --git a/plugins/TorrentNotification/__init__.py b/plugins/TorrentNotification/__init__.py index a6237b424..cd80e6adb 100644 --- a/plugins/TorrentNotification/__init__.py +++ b/plugins/TorrentNotification/__init__.py @@ -99,7 +99,8 @@ class TorrentNotification: if pynotify.init("Deluge"): n = pynotify.Notification(_("Torrent complete"), - _("Files") + ":\n" + filelist, deluge.common.get_pixmap("deluge48.png")) + _("Files") + ":\n" + filelist) + n.set_icon_from_pixbuf(deluge.common.get_logo(48)) n.show() else: print "there was a problem initializing the pynotify module" diff --git a/setup.py b/setup.py index 614335830..ac96aee3a 100644 --- a/setup.py +++ b/setup.py @@ -282,6 +282,33 @@ cmdclass = { data = [('share/deluge/glade', glob.glob('glade/*.glade')), ('share/deluge/pixmaps', glob.glob('pixmaps/*.png')), + ('share/deluge/pixmaps', glob.glob('pixmaps/*.svg')), + ('share/deluge/icons/scalable/apps', glob.glob('icons/scalable/apps/*.svg')), + ('share/deluge/icons/hicolor', glob.glob('icons/hicolor/*.png')), + ('share/deluge/icons/hicolor/128x128', glob.glob('icons/hicolor/128x128/*.png')), + ('share/deluge/icons/hicolor/128x128/apps', glob.glob('icons/hicolor/128x128/apps/*.png')), + ('share/deluge/icons/hicolor/16x16', glob.glob('icons/hicolor/16x16/*.png')), + ('share/deluge/icons/hicolor/16x16/apps', glob.glob('icons/hicolor/16x16/apps/*.png')), + ('share/deluge/icons/hicolor/192x192', glob.glob('icons/hicolor/192x192/*.png')), + ('share/deluge/icons/hicolor/192x192/apps', glob.glob('icons/hicolor/192x192/apps/*.png')), + ('share/deluge/icons/hicolor/22x22', glob.glob('icons/hicolor/22x22/*.png')), + ('share/deluge/icons/hicolor/22x22/apps', glob.glob('icons/hicolor/22x22/apps/*.png')), + ('share/deluge/icons/hicolor/24x24', glob.glob('icons/hicolor/24x24/*.png')), + ('share/deluge/icons/hicolor/24x24/apps', glob.glob('icons/hicolor/24x24/apps/*.png')), + ('share/deluge/icons/hicolor/256x256', glob.glob('icons/hicolor/256x256/*.png')), + ('share/deluge/icons/hicolor/256x256/apps', glob.glob('icons/hicolor/256x256/apps/*.png')), + ('share/deluge/icons/hicolor/32x32', glob.glob('icons/hicolor/32x32/*.png')), + ('share/deluge/icons/hicolor/32x32/apps', glob.glob('icons/hicolor/32x32/apps/*.png')), + ('share/deluge/icons/hicolor/36x36', glob.glob('icons/hicolor/36x36/*.png')), + ('share/deluge/icons/hicolor/36x36/apps', glob.glob('icons/hicolor/36x36/apps/*.png')), + ('share/deluge/icons/hicolor/48x48', glob.glob('icons/hicolor/48x48/*.png')), + ('share/deluge/icons/hicolor/48x48/apps', glob.glob('icons/hicolor/48x48/apps/*.png')), + ('share/deluge/icons/hicolor/64x64', glob.glob('icons/hicolor/64x64/*.png')), + ('share/deluge/icons/hicolor/64x64/apps', glob.glob('icons/hicolor/64x64/apps/*.png')), + ('share/deluge/icons/hicolor/72x72', glob.glob('icons/hicolor/72x72/*.png')), + ('share/deluge/icons/hicolor/72x72/apps', glob.glob('icons/hicolor/72x72/apps/*.png')), + ('share/deluge/icons/hicolor/96x96', glob.glob('icons/hicolor/96x96/*.png')), + ('share/deluge/icons/hicolor/96x96/apps', glob.glob('icons/hicolor/96x96/apps/*.png')), ('share/deluge/pixmaps/flags18x12', glob.glob('pixmaps/flags18x12/*.png')), ('share/deluge/pixmaps/flags25x15', glob.glob('pixmaps/flags25x15/*.png')), ('share/applications' , ['deluge.desktop']), diff --git a/src/common.py b/src/common.py index f299684f9..b0c87b38b 100644 --- a/src/common.py +++ b/src/common.py @@ -127,6 +127,11 @@ def get_glade_file(fname): def get_pixmap(fname): return os.path.join(PIXMAP_DIR, fname) + +def get_logo(size): + import gtk + return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), size,\ + size) def open_url_in_browser(link): import threading diff --git a/src/dialogs.py b/src/dialogs.py index ccba4073f..d7b58442c 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -45,7 +45,7 @@ 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_from_file(common.get_pixmap("deluge32.png")) + self.dialog.set_icon(common.get_logo(32)) self.glade.signal_autoconnect({ 'toggle_ui': self.toggle_ui, 'on_btn_testport_clicked': self.TestPort, @@ -364,7 +364,7 @@ class MergeDlg: domain='deluge') self.dialog = self.glade.get_widget("merge_dialog") self.dialog.set_position(gtk.WIN_POS_CENTER) - self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png")) + self.dialog.set_icon(common.get_logo(32)) def show(self, window): self.dialog.set_transient_for(window) @@ -380,7 +380,7 @@ class FilesDlg: domain='deluge') self.dialog = self.glade.get_widget("file_dialog") self.dialog.set_position(gtk.WIN_POS_CENTER) - self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png")) + self.dialog.set_icon(common.get_logo(32)) self.files_manager = files.FilesDialogManager( self.glade.get_widget("file_view"), @@ -419,7 +419,7 @@ def show_about_dialog(parent=None): 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_from_file(common.get_pixmap("deluge32.png")) + 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() @@ -471,8 +471,7 @@ def show_file_open_dialog(parent=None, title=None): chooser.set_current_folder(config.get("open_torrent_dialog_path")) chooser.add_filter(f1) chooser.set_select_multiple(True) - - chooser.set_icon_from_file(common.get_pixmap("deluge32.png")) + chooser.set_icon(common.get_logo(32)) chooser.set_property("skip-taskbar-hint", True) response = chooser.run() @@ -487,7 +486,7 @@ def show_file_open_dialog(parent=None, 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_from_file(common.get_pixmap("deluge32.png")) + 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")) diff --git a/src/interface.py b/src/interface.py index 7526b4a4b..c42aa71f1 100644 --- a/src/interface.py +++ b/src/interface.py @@ -71,7 +71,7 @@ class DelugeGTK: self.window.connect("window-state-event", self.window_state_event) self.window.connect("configure-event", self.window_configure_event) self.window.set_title(common.PROGRAM_NAME) - self.window.set_icon_from_file(common.get_pixmap("deluge32.png")) + self.window.set_icon(common.get_logo(32)) # self.notebook is used by plugins self.notebook = self.wtree.get_widget("torrent_info") @@ -213,8 +213,7 @@ class DelugeGTK: self.manager.resume_all() def build_tray_icon(self): - self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap\ - ("deluge32.png")) + self.tray_icon = gtk.status_icon_new_from_pixbuf(common.get_logo(32)) self.tray_glade = gtk.glade.XML(common.get_glade_file\ ("tray_menu.glade"), domain='deluge') @@ -1252,7 +1251,7 @@ trunk/+pots/deluge') def add_torrent_url_clicked(self, obj=None): dlg = gtk.Dialog(title=_("Add torrent from URL"), parent=self.window, buttons=(gtk.STOCK_CANCEL, 0, gtk.STOCK_OK, 1)) - dlg.set_icon_from_file(common.get_pixmap("deluge32.png")) + dlg.set_icon(common.get_logo(32)) label = gtk.Label(_("Enter the URL of the .torrent to download")) entry = gtk.Entry() @@ -1276,8 +1275,7 @@ trunk/+pots/deluge') glade = gtk.glade.XML(common.get_glade_file("dgtkpopups.glade"), domain='deluge') asker = glade.get_widget("remove_torrent_dlg") - - asker.set_icon_from_file(common.get_pixmap("deluge32.png")) + asker.set_icon(common.get_logo(32)) warning = glade.get_widget("warning") warning.set_text(" ") diff --git a/src/wizard.py b/src/wizard.py index c4c12a091..487f111e0 100644 --- a/src/wizard.py +++ b/src/wizard.py @@ -50,8 +50,7 @@ class WizardGTK: 'close': self.cancel}) #add deluge logo to headers self.window = self.wtree.get_widget("wizard") - pixmap = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap(\ - "deluge48.png")) + pixmap = deluge.common.get_logo(48) self.window.set_page_header_image(self.wtree.get_widget('label1'), \ pixmap) self.window.set_page_header_image(self.wtree.get_widget('vbox1'), \