Fixed GEDCOM import of images

svn: r455
This commit is contained in:
Don Allingham
2001-10-11 13:15:10 +00:00
parent 7aef6c5340
commit d5b51fe57b
4 changed files with 46 additions and 19 deletions

View File

@ -783,6 +783,10 @@ class GedcomParser:
photo = Photo()
photo.setPath(path)
photo.setDescription(title)
photo.setMimeType(gnome.mime.type_or_default_of_file(name,"unknown"))
db.addObject(photo)
oref = ObjectRef()
oref.setReference(photo)
self.person.addPhoto(photo)
else:
self.warn(_("Could not import %s: currently an unknown file type") % \