diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2009-09-05 16:24:26 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2009-09-05 16:24:26 (GMT) |
commit | 9a9a2f69127864ec86010cf21454c66cddc111c2 (patch) | |
tree | 57a454ae579008a5c3df38e57b8111d4c303ac0b /tasetup.py | |
parent | a7b2843cad4c004adb4e6dfe3593a9d340eb0c72 (diff) |
stack -> action
Diffstat (limited to 'tasetup.py')
-rw-r--r-- | tasetup.py | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -133,8 +133,8 @@ selectors = ( ('stack1','stack1','noarg'), ('hat2','nop2','start'), ('stack2','stack2','noarg'), - ('hat','nop3','starts',_('stack')), - ('stack','stack','sarg',_('stack')), + ('hat','nop3','starts',_('action')), + ('stack','stack','sarg',_('action')), ('storeinbox1','storeinbox1','1arg'), ('box1','box1','num'), ('storeinbox2','storeinbox2','1arg'), @@ -342,16 +342,25 @@ def load_image(path, dir, file): # first try to open the cached image # then try to open .png file # if you fail, open the .svg file and cache the result as png + # finally, fallback to tw.path_en try: return gtk.gdk.pixbuf_new_from_file(os.path.join(datapath, file+'.png')) except: try: print "trying ... " + os.path.join(path, dir, file+'.png') - return gtk.gdk.pixbuf_new_from_file(os.path.join(path, dir, \ + return gtk.gdk.pixbuf_new_from_file(os.path.join(path, \ + dir, \ file+'.png')) except: - foo = gtk.gdk.pixbuf_new_from_file(os.path.join(path, dir, \ - file +'.svg')) - foo.save(os.path.join(datapath, file+'.png'), "png") - return foo - + try: + foo = gtk.gdk.pixbuf_new_from_file(os.path.join(path, \ + dir, \ + file +'.svg')) + foo.save(os.path.join(datapath, file+'.png'), "png") + return foo + except: + foo = gtk.gdk.pixbuf_new_from_file(os.path.join(tw.path_en,\ + dir, \ + file +'.svg')) + foo.save(os.path.join(datapath, file+'.png'), "png") + return foo |