* src/GrampsBSDDB.py: thumbnail handing in the database

* src/GrampsDbBase.py: add set_thumbnail_image and
get_thumbnail_image in base class
* src/GrampsInMemDB.py: saving thumbnail image
* src/GrampsCfg.py: create thumbnail image directory
* src/ImageSelect.py: use new thumbnail scheme
* src/MediaView.py: use new thumbnail scheme
* src/ReadGedcom.py: use new thumbnail scheme
* src/ReadXML.py: use new thumbnail scheme
* src/SelectObject.py: use new thumbnail scheme
* src/gramps_main.py: use new thumbnail scheme
* src/Utils.py: remove unused tasks
* src/RelImage.py: remove unused tasks

* src/DateParser.py: fix dates of the format of JAN 2000


svn: r3662
This commit is contained in:
Don Allingham
2004-10-23 03:56:48 +00:00
parent 4df725c5c2
commit fb2ef63eee
13 changed files with 164 additions and 205 deletions

View File

@ -76,7 +76,7 @@ def importData(database, filename, callback=None,cl=0,use_trans=True):
database.fmap = {}
change = os.path.getmtime(filename)
parser = GrampsParser(database,callback,basefile,change)
parser = GrampsParser(database,callback,basefile,change,filename)
if gzip_ok:
use_gzip = 1
@ -273,7 +273,8 @@ def fix_spaces(text_list):
#-------------------------------------------------------------------------
class GrampsParser:
def __init__(self,database,callback,base,change):
def __init__(self,database,callback,base,change,filename):
self.filename = filename
self.stext_list = []
self.scomments_list = []
self.note_list = []
@ -913,7 +914,11 @@ class GrampsParser:
self.object.set_description(attrs['description'])
src = attrs["src"]
if src:
if src[0] != '/':
fullpath = os.path.abspath(self.filename)
src = os.path.dirname(fullpath) + '/' + src
self.object.set_path(src)
self.db.set_thumbnail_image(self.object.get_handle(),src)
def stop_people(self,*tag):
pass