diff options
author | Walter 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) |
commit | aef760b7fa88d0c7f00acbfd64516eb0d180d221 (patch) | |
tree | 3f8001625b9928a4e5c92afd61a313746bf8b50c /talogo.py | |
parent | 5a31ab520b3157b77f68b293d934e6fec0576d41 (diff) |
read sample images from file system
Diffstat (limited to 'talogo.py')
-rw-r--r-- | talogo.py | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -1035,15 +1035,21 @@ class LogoCode: if self.tw.running_sugar: try: dsobject = datastore.get(media[6:]) + if movie_media_type(dsobject.file_path): + play_movie_from_file(self, dsobject.file_path, + int(x), int(y), int(w), int(h)) + else: + pixbuf = get_pixbuf_from_journal(dsobject, + int(w), int(h)) + dsobject.destroy() except: - self.tw.showlabel('nojournal', media[6:]) - print "Couldn't open Journal object %s" % (media[6:]) - if movie_media_type(dsobject.file_path): - play_movie_from_file(self, - dsobject.file_path, int(x), int(y), int(w), int(h)) - else: - pixbuf = get_pixbuf_from_journal(dsobject, int(w), int(h)) - dsobject.destroy() + # Maybe it is a pathname instead. + try: + pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( + media[6:], int(w), int(h)) + except: + self.tw.showlabel('nojournal', media[6:]) + print "Couldn't open Journal object %s" % (media[6:]) else: try: if movie_media_type(media): |