* src/EditPerson.py: unused code

* src/ImgManip.py: convienence code
* src/Sources.py: DisplayManager-ize the SourceEditor


svn: r5864
This commit is contained in:
Don Allingham
2006-02-02 05:20:42 +00:00
parent 15bc78db47
commit da30e8d5fa
6 changed files with 550 additions and 660 deletions

View File

@@ -162,3 +162,13 @@ def get_thumbnail_path(path,mtype=None):
if not os.path.isfile(filename):
set_thumbnail_image(path,mtype)
return filename
def get_thumb_from_obj(obj):
mtype = obj.get_mime_type()
if mtype[0:5] == "image":
image = get_thumbnail_image(obj.get_path())
else:
image = GrampsMime.find_mime_type_pixbuf(mtype)
if not image:
image = gtk.gdk.pixbuf_new_from_file(const.icon)
return image