~deb-thumbnailer-team/deb-thumbnailer/main

« back to all changes in this revision

Viewing changes to deb-thumbnailer

  • Committer: George Dumitrescu
  • Date: 2010-08-30 18:48:25 UTC
  • Revision ID: george@george-laptop-20100830184825-qz8g0ftwc4l33y4a
Recreating default theme icon for each deb

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
GENERIC_APP=''
21
21
GENERIC_LIB=''
22
 
VERSION='0.8'
 
22
VERSION='0.8.2'
23
23
CONFIG_DIR = '/apps/deb-thumbnailer'
24
24
ICON_THEME = gtk.icon_theme_get_default()
25
25
HOME_DIR = os.getenv("HOME")
152
152
    pkgIconExt = os.path.splitext(pkgIcon)[1]
153
153
    # TODO: ask theme for png directly | INFO: not all themes provide png
154
154
    if pkgIconExt == '.svg':
155
 
        if not os.path.exists('/tmp/x-deb-%d.png' % size):
156
 
            os.system("rsvg-convert %s -w %d -h %d -o /tmp/x-deb-%d.png" % (pkgIcon, size, size, size))
 
155
        if os.path.exists('/tmp/x-deb-%d.png' % size):
 
156
            os.unlink('/tmp/x-deb-%d.png' % size)
 
157
        os.system("rsvg-convert %s -w %d -h %d -o /tmp/x-deb-%d.png" % (pkgIcon, size, size, size))
157
158
        return "/tmp/x-deb-%d.png" % size
158
159
    else:
159
160
        return pkgIcon