From 5c62a201c2a13fa8be5ceab20ef827719beb66d7 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 3 Sep 2001 04:19:17 +0000 Subject: [PATCH] Fixed thumbnail problem svn: r382 --- gramps/src/EditPlace.py | 5 ++++- gramps/src/EditSource.py | 5 ++++- gramps/src/Marriage.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gramps/src/EditPlace.py b/gramps/src/EditPlace.py index 7f4fa0ab7..4d73c6b5c 100644 --- a/gramps/src/EditPlace.py +++ b/gramps/src/EditPlace.py @@ -188,7 +188,10 @@ class EditPlace: #------------------------------------------------------------------------- def add_thumbnail(self,photo): src = os.path.basename(photo.getPath()) - thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src) + 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(src,thumb,const.thumbScale) self.photo_list.append(thumb,photo.getDescription()) diff --git a/gramps/src/EditSource.py b/gramps/src/EditSource.py index 06f2ea3b4..0b3aafd8a 100644 --- a/gramps/src/EditSource.py +++ b/gramps/src/EditSource.py @@ -107,7 +107,10 @@ class EditSource: #------------------------------------------------------------------------- def add_thumbnail(self,photo): src = os.path.basename(photo.getPath()) - thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src) + 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(src,thumb,const.thumbScale) self.photo_list.append(thumb,photo.getDescription()) diff --git a/gramps/src/Marriage.py b/gramps/src/Marriage.py index 3c05c562e..fbf55b5ce 100644 --- a/gramps/src/Marriage.py +++ b/gramps/src/Marriage.py @@ -170,7 +170,10 @@ class Marriage: #------------------------------------------------------------------------- def add_thumbnail(self,photo): src = os.path.basename(photo.getPath()) - thumb = "%s%s.thumb%s%s" % (self.path,os.sep,os.sep,src) + 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(src,thumb,const.thumbScale) self.photo_list.append(thumb,photo.getDescription())