Permalink
Browse files

icons and internal pixmap

  • Loading branch information...
1 parent 9d2f6ad commit bc88fb3d11ef1734080c9ef43ded33468754d1a0 Marcos Pinto committed Sep 16, 2007
View
@@ -0,0 +1,6 @@
+#!/bin/bash
+for size in 16 22 24 32 36 48 64 72 96 128 192 256; do mkdir -p deluge/data/\
+icons/hicolor/${size}x${size}/apps; rsvg-convert -w ${size} -h ${size} \
+-o deluge/data/icons/hicolor/${size}x${size}/apps/deluge.png deluge/data/pixmaps\
+/deluge.svg; mkdir -p deluge/data/icons/scalable/apps/; cp deluge/data/pixmaps/\
+deluge.svg deluge/data/icons/scalable/apps/deluge.svg; done
View
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=Deluge BitTorrent Client
+Comment=Bittorrent client written in PyGTK
+Exec=deluge
+Icon=deluge.png
+Terminal=false
+Type=Application
+Categories=Application;Network
+StartupNotify=true
+MimeType=application/x-bittorrent;
View
@@ -115,3 +115,25 @@ def ftime(seconds):
if weeks < 10:
return '%dw %dd' % (weeks, days)
return 'unknown'
+
+def windows_check():
+ import platform
+ if platform.system() in ('Windows', 'Microsoft'):
+ return True
+ else:
+ return False
+
+def get_pixmap(fname):
+ import pkg_resources
+ from os import path
+ return pkg_resources.resource_filename("deluge", path.join("data", \
+ "pixmaps", 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"), \
+ size, size)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit bc88fb3

Please sign in to comment.