* src/ThumbNails.py (get_thumbnail_image): handle missing image

* src/images/image-missing.png: added
	* src/images/Makefile.am: added image-missing.png



svn: r8967
This commit is contained in:
Don Allingham 2007-09-12 16:37:27 +00:00
parent 9490507fd5
commit 6665df0a3e
4 changed files with 14 additions and 7 deletions

View File

@ -2,6 +2,9 @@
* src/plugins/lineage.py: Improvements
2007-09-12 Don Allingham <don@gramps-project.org>
* src/ThumbNails.py (get_thumbnail_image): handle missing image
* src/images/image-missing.png: added
* src/images/Makefile.am: added image-missing.png
* src/docgen/ODFDoc.py (ODFDoc): Fix ratio assignment
2007-09-12 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
@ -24,7 +27,7 @@
2007-09-10 Don Allingham <don@gramps-project.org>
* src/SubstKeywords.py (SubstKeywords.replace_and_clean): fix substitution
* src/ImgManip.py: fix typo
2007-09-10 Don Allingham <don@gramps-project.org>
* src/plugins/WriteCD.py: don't generate thumbnails
* src/Selectors/_SelectObject.py: new image sizing routines

View File

@ -260,9 +260,12 @@ def get_thumbnail_path(src_file, mtype=None):
@rtype: gtk.gdk.Pixbuf
"""
filename = __build_thumb_path(src_file)
if not os.path.isfile(filename):
__create_thumbnail_image(src_file, mtype)
elif os.path.getmtime(src_file) > os.path.getmtime(filename):
__create_thumbnail_image(src_file, mtype)
return os.path.abspath(filename)
if not os.path.isfile(src_file):
return os.path.join(const.IMAGE_DIR, "image-missing.png")
else:
if not os.path.isfile(filename):
__create_thumbnail_image(src_file, mtype)
elif os.path.getmtime(src_file) > os.path.getmtime(filename):
__create_thumbnail_image(src_file, mtype)
return os.path.abspath(filename)

View File

@ -66,7 +66,8 @@ dist_pkgdata_DATA = \
stock_link.png\
stock_notes.png\
somerights20.gif \
document.png #\ $(map_tile_images)
document.png \
image-missing.png
EXTRA_DIST = gramps.svg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB