no message

svn: r460
This commit is contained in:
Don Allingham 2001-10-11 23:45:06 +00:00
parent e4d82797d2
commit 0695f265e6

View File

@ -83,14 +83,14 @@ placemap = {}
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
def find_file(fullname,altpath): def find_file(fullname,altpath):
if os.path.isfile(fullname): if os.path.isfile(fullname):
type = gnome.mime.type(fullname) type = utils.get_mime_type(fullname)
if type[0:6] != "image/": if type[0:6] != "image/":
return "" return ""
else: else:
return fullname return fullname
other = altpath + os.sep + os.path.basename(fullname) other = altpath + os.sep + os.path.basename(fullname)
if os.path.isfile(other): if os.path.isfile(other):
type = gnome.mime.type(other) type = utils.get_mime_type(other)
if type[0:6] != "image/": if type[0:6] != "image/":
return "" return ""
else: else:
@ -783,7 +783,7 @@ class GedcomParser:
photo = Photo() photo = Photo()
photo.setPath(path) photo.setPath(path)
photo.setDescription(title) photo.setDescription(title)
photo.setMimeType(gnome.mime.type_or_default_of_file(name,"unknown")) photo.setMimeType(utils.get_mime_type(path))
db.addObject(photo) db.addObject(photo)
oref = ObjectRef() oref = ObjectRef()
oref.setReference(photo) oref.setReference(photo)