diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-01-30 23:32:43 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-01-30 23:32:43 (GMT) |
commit | f3f438af59c69b584d84b27f103f9392fc8185f8 (patch) | |
tree | 808556779f0d70312625b6d50277371bbf19b880 /Theme.py | |
parent | 56cea3b5c6361c7958e1c27182fcf117470a1861 (diff) |
...
Diffstat (limited to 'Theme.py')
-rw-r--r-- | Theme.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -14,8 +14,9 @@ import os import gtk +import shutil -from sugar.activity.activity import get_bundle_path +from sugar.activity.activity import get_bundle_path, get_activity_root from sugar.graphics import style TRANSIMG = '50x50blank-trans.png' @@ -77,6 +78,11 @@ OLD_COLOR_BG_BUTTONS = ( (gtk.STATE_INSENSITIVE,"#027F01"), ) +SESSION_PATH = os.path.join(get_activity_root(), 'tmp', '.session') +if os.path.isdir(SESSION_PATH): + shutil.rmtree(SESSION_PATH) +os.mkdir(SESSION_PATH) + def path(file): if os.path.isabs(file): return file @@ -92,8 +98,10 @@ def pixbuf(file, size = None): EMPTY_PIXBUF = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, 1, 1) +def scale(pixbuf, size = THUMB_SIZE): + return pixbuf.scale_simple(size, size, gtk.gdk.INTERP_BILINEAR) -def choose_pixbuf(out_fun): +def choose(out_fun): from sugar.graphics.objectchooser import ObjectChooser chooser = ObjectChooser() |