Add Mime package

svn: r6047
This commit is contained in:
Alex Roitman
2006-03-03 00:23:04 +00:00
parent 4efbaaa16c
commit 7286845b75
26 changed files with 73 additions and 70 deletions

View File

@ -42,7 +42,7 @@ from gettext import gettext as _
#-------------------------------------------------------------------------
import const
import GrampsDb
import GrampsMime
import Mime
import QuestionDialog
import Config
import RecentFiles
@ -127,7 +127,7 @@ class ArgHandler:
o,v = options[opt_ix]
if o in ( '-O', '--open'):
fname = v
ftype = GrampsMime.get_type(
ftype = Mime.get_type(
os.path.abspath(os.path.expanduser(fname)))
if opt_ix<len(options)-1 \
and options[opt_ix+1][0] in ( '-f', '--format'):
@ -149,7 +149,7 @@ class ArgHandler:
self.open = (fname,format)
elif o in ( '-i', '--import'):
fname = v
ftype = GrampsMime.get_type(
ftype = Mime.get_type(
os.path.abspath(os.path.expanduser(fname)))
if opt_ix<len(options)-1 \
and options[opt_ix+1][0] in ( '-f', '--format'):
@ -227,7 +227,7 @@ class ArgHandler:
#-------------------------------------------------------------------------
def auto_save_load(self,filename):
filename = os.path.normpath(os.path.abspath(filename))
filetype = GrampsMime.get_type(filename)
filetype = Mime.get_type(filename)
if filetype in (const.app_gramps,
const.app_gramps_xml,
const.app_gedcom):
@ -253,7 +253,7 @@ class ArgHandler:
# the rest of given arguments.
success = False
filename = os.path.abspath(os.path.expanduser(self.open_gui))
filetype = GrampsMime.get_type(filename)
filetype = Mime.get_type(filename)
if filetype in (const.app_gramps,const.app_gedcom,
const.app_gramps_xml):
# Say the type outloud