Fixed thumbnail problem

svn: r381
This commit is contained in:
Don Allingham 2001-09-03 03:51:34 +00:00
parent 89806cd6d5
commit f91ede1657
3 changed files with 8 additions and 4 deletions

View File

@ -334,8 +334,11 @@ class EditPerson:
#-------------------------------------------------------------------------
def add_thumbnail(self,photo):
src = os.path.basename(photo.getPath())
thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src)
RelImage.check_thumb(src,thumb,const.thumbScale)
if photo.getPrivate():
thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src)
else:
thumb = "%s%s.thumb%s%s.jpg" % (self.path,os.sep,os.sep,os.path.basename(src))
RelImage.check_thumb(photo.getPath(),thumb,const.thumbScale)
self.photo_list.append(thumb,photo.getDescription())
#-------------------------------------------------------------------------
@ -1194,6 +1197,8 @@ def on_savephoto_clicked(obj):
if epo.external.get_active() == 1:
if os.path.isfile(filename):
name = filename
thumb = "%s%s.thumb.jpg" % (path,os.sep,os.path.basename(filename))
RelImage.mk_thumb(filename,thumb,const.thumbScale)
else:
return
else:

View File

@ -80,7 +80,6 @@ def import_photo(filename,path,prefix):
else:
PIL.Image.open(filename).save(name)
except:
print path
return None
return name

View File

@ -15,7 +15,6 @@
<widget>
<class>GnomeDialog</class>
<name>imageSelect</name>
<width>300</width>
<title>Gramps - Select a picture</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_CENTER</position>
@ -305,6 +304,7 @@
<widget>
<class>GnomeFileEntry</class>
<name>photosel</name>
<width>350</width>
<history_id>photoselect</history_id>
<max_saved>10</max_saved>
<title>Select an image</title>