Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tasetup.py
diff options
context:
space:
mode:
authorWalter 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)
commit9a9a2f69127864ec86010cf21454c66cddc111c2 (patch)
tree57a454ae579008a5c3df38e57b8111d4c303ac0b /tasetup.py
parenta7b2843cad4c004adb4e6dfe3593a9d340eb0c72 (diff)
stack -> action
Diffstat (limited to 'tasetup.py')
-rw-r--r--tasetup.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/tasetup.py b/tasetup.py
index 81398dc..34fcd8c 100644
--- a/tasetup.py
+++ b/tasetup.py
@@ -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