* src/DbPrompter.py (ImportDbPrompter.chooser): Explicitly

import XML and GEDCOM.
* src/plugins/FilterEditor.py (MySelect.get_text): Typo.


svn: r4108
This commit is contained in:
Alex Roitman 2005-03-02 14:00:51 +00:00
parent 693c5988f0
commit 028ed21efc
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-03-02 Alex Roitman <shura@alex.neuro.umn.edu>
* src/DbPrompter.py (ImportDbPrompter.chooser): Explicitly
import XML and GEDCOM.
* src/plugins/FilterEditor.py (MySelect.get_text): Typo.
2005-02-27 Alex Roitman <shura@alex.neuro.umn.edu> 2005-02-27 Alex Roitman <shura@alex.neuro.umn.edu>
* src/DbPrompter.py (format_maker): Add mnemonic activation target * src/DbPrompter.py (format_maker): Add mnemonic activation target
to the format selector label; Use new import format; don't treat to the format selector label; Use new import format; don't treat

View File

@ -293,11 +293,21 @@ class ImportDbPrompter:
if filetype == 'auto': if filetype == 'auto':
filetype = get_mime_type(filename) filetype = get_mime_type(filename)
if filetype == 'application/x-gramps': if filetype == const.app_gramps:
choose.destroy() choose.destroy()
ReadGrdb.importData(self.parent.db,filename) ReadGrdb.importData(self.parent.db,filename)
self.parent.import_tool_callback() self.parent.import_tool_callback()
return True return True
elif filetype == const.app_gramps_xml:
choose.destroy()
import ReadXML
ReadXML.importData(self.parent.db,filename)
return True
elif filetype == const.app_gramps_gedcom:
choose.destroy()
import ReadGedcom
ReadGedcom.importData(self.parent.db,filename)
return True
(the_path,the_file) = os.path.split(filename) (the_path,the_file) = os.path.split(filename)
GrampsKeys.save_last_import_dir(the_path) GrampsKeys.save_last_import_dir(the_path)

View File

@ -1,7 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2000-2004 Donald N. Allingham # Copyright (C) 2000-2005 Donald N. Allingham
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -200,6 +200,7 @@ class MySelect(gtk.ComboBoxEntry):
def __init__(self,transtable): def __init__(self,transtable):
gtk.ComboBoxEntry.__init__(self) gtk.ComboBoxEntry.__init__(self)
self.transtable = transtable
AutoComp.fill_combo(self,transtable.get_values()) AutoComp.fill_combo(self,transtable.get_values())
self.show() self.show()