Fixed thumbnail problem
svn: r381
This commit is contained in:
parent
ae9f441ad9
commit
26aed368cb
@ -334,8 +334,11 @@ class EditPerson:
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def add_thumbnail(self,photo):
|
def add_thumbnail(self,photo):
|
||||||
src = os.path.basename(photo.getPath())
|
src = os.path.basename(photo.getPath())
|
||||||
|
if photo.getPrivate():
|
||||||
thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src)
|
thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src)
|
||||||
RelImage.check_thumb(src,thumb,const.thumbScale)
|
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())
|
self.photo_list.append(thumb,photo.getDescription())
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -1194,6 +1197,8 @@ def on_savephoto_clicked(obj):
|
|||||||
if epo.external.get_active() == 1:
|
if epo.external.get_active() == 1:
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
name = filename
|
name = filename
|
||||||
|
thumb = "%s%s.thumb.jpg" % (path,os.sep,os.path.basename(filename))
|
||||||
|
RelImage.mk_thumb(filename,thumb,const.thumbScale)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
@ -80,7 +80,6 @@ def import_photo(filename,path,prefix):
|
|||||||
else:
|
else:
|
||||||
PIL.Image.open(filename).save(name)
|
PIL.Image.open(filename).save(name)
|
||||||
except:
|
except:
|
||||||
print path
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GnomeDialog</class>
|
<class>GnomeDialog</class>
|
||||||
<name>imageSelect</name>
|
<name>imageSelect</name>
|
||||||
<width>300</width>
|
|
||||||
<title>Gramps - Select a picture</title>
|
<title>Gramps - Select a picture</title>
|
||||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||||
<position>GTK_WIN_POS_CENTER</position>
|
<position>GTK_WIN_POS_CENTER</position>
|
||||||
@ -305,6 +304,7 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GnomeFileEntry</class>
|
<class>GnomeFileEntry</class>
|
||||||
<name>photosel</name>
|
<name>photosel</name>
|
||||||
|
<width>350</width>
|
||||||
<history_id>photoselect</history_id>
|
<history_id>photoselect</history_id>
|
||||||
<max_saved>10</max_saved>
|
<max_saved>10</max_saved>
|
||||||
<title>Select an image</title>
|
<title>Select an image</title>
|
||||||
|
Loading…
Reference in New Issue
Block a user