Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-15 22:42:59 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-15 22:42:59 (GMT)
commitaef760b7fa88d0c7f00acbfd64516eb0d180d221 (patch)
tree3f8001625b9928a4e5c92afd61a313746bf8b50c /tawindow.py
parent5a31ab520b3157b77f68b293d934e6fec0576d41 (diff)
read sample images from file system
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tawindow.py b/tawindow.py
index 4a3e0d2..906afe1 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -2232,9 +2232,16 @@ class TurtleArtWindow():
self._block_skin('journalon', blk)
dsobject.destroy()
except:
- print "Warning: Couldn't open dsobject (%s)" %\
- (blk.values[0])
- self._block_skin('journaloff', blk)
+ try:
+ w, h, = calc_image_size(blk.spr)
+ pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(
+ blk.values[0], w, h)
+ x, y = self._calc_image_offset('', blk.spr)
+ blk.set_image(pixbuf, x, y)
+ except:
+ print "Warning: Couldn't open dsobject (%s)" %\
+ (blk.values[0])
+ self._block_skin('journaloff', blk)
else:
if not movie_media_type(blk.values[0][-4:]):
try: