Image fixes

svn: r1286
This commit is contained in:
Don Allingham
2003-02-05 13:53:00 +00:00
parent 3cd92882fd
commit 4d69982b87
11 changed files with 200 additions and 74 deletions

View File

@@ -328,12 +328,22 @@ class Gallery(ImageSelect):
if x != self.cx or y != self.cy:
grp.move(self.cx-x,self.cy-y)
else:
import gobject
name = Utils.thumb_path(self.db.getSavePath(),object)
description = object.getDescription()
if len(description) > 20:
description = "%s..." % description[0:20]
image = gtk.gdk.pixbuf_new_from_file(name)
try:
image = gtk.gdk.pixbuf_new_from_file(name)
except gobject.GError,msg:
ErrorDialog(str(msg))
image = gtk.gdk.pixbuf_new_from_file(const.icon)
except:
ErrorDialog(_("Thumbnail %s could not be found") % name)
image = gtk.gdk.pixbuf_new_from_file(const.icon)
x = image.get_width()
y = image.get_height()