* src/ImgManip.py: update thumbnail if out of date
svn: r5207
This commit is contained in:
parent
6e5c529ba1
commit
089a8c4d06
@ -1,3 +1,6 @@
|
||||
2005-09-20 Don Allingham <don@gramps-project.org>
|
||||
* src/ImgManip.py: update thumbnail if out of date
|
||||
|
||||
2005-09-20 Alex Roitman <shura@gramps-project.org>
|
||||
* INSTALL: Provide correct examples for the local install.
|
||||
* gramps.sh.in: Revert escaping the arguments, as this lumps all
|
||||
|
@ -142,9 +142,12 @@ def set_thumbnail_image(path,mtype=None):
|
||||
|
||||
def get_thumbnail_image(path,mtype=None):
|
||||
filename = _build_thumb_path(path)
|
||||
|
||||
try:
|
||||
if not os.path.isfile(filename):
|
||||
set_thumbnail_image(path,mtype)
|
||||
try:
|
||||
elif os.path.getmtime(path) > os.path.getmtime(filename):
|
||||
set_thumbnail_image(path,mtype)
|
||||
return gtk.gdk.pixbuf_new_from_file(filename)
|
||||
except gobject.GError:
|
||||
if mtype:
|
||||
@ -155,6 +158,5 @@ def get_thumbnail_image(path,mtype=None):
|
||||
def get_thumbnail_path(path,mtype=None):
|
||||
filename = _build_thumb_path(path)
|
||||
if not os.path.isfile(filename):
|
||||
print "setting",filename
|
||||
set_thumbnail_image(path,mtype)
|
||||
return filename
|
||||
|
Loading…
Reference in New Issue
Block a user