2007-01-22 Don Allingham <don@gramps-project.org>

* src/ViewManager.py: import of gramps package
	* src/ArgHandler.py: import of gramps package
	* src/GrampsDb/_ReadGedcom.py: catch bad LDS ords



svn: r7955
This commit is contained in:
Don Allingham 2007-01-22 17:51:43 +00:00
parent 664d8823d2
commit c43c32a644
4 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2007-01-22 Don Allingham <don@gramps-project.org>
* src/ViewManager.py: import of gramps package
* src/ArgHandler.py: import of gramps package
* src/GrampsDb/_ReadGedcom.py: catch bad LDS ords
2007-01-22 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/ArgHandler.py,
* src/DbLoader.py: Print out more precise error messages when trying

View File

@ -326,7 +326,7 @@ class ArgHandler:
os._exit(1)
elif filetype == const.app_gramps_package:
print "Type: GRAMPS package"
self.read_pkg(filename)
self.vm.import_pkg(filename)
success = True
else:
print "Unknown file type: %s" % filetype
@ -754,9 +754,9 @@ class NewNativeDbPrompter:
print Config.TRANSACTIONS
self.state.db = GrampsDb.gramps_db_factory(const.app_gramps)(
Config.TRANSACTIONS)
self.vm.read_file(filename)
self.vm.db_loader.read_file(filename, const.app_gramps)
self.state.signal_change()
self.change_page(None, None)
#self.change_page(None, None)
# Add the file to the recent items
RecentFiles.recent_files(filename,const.app_gramps)
return True

View File

@ -1328,8 +1328,9 @@ class GedcomParser(UpdateCallback):
a.set_value(matches[2])
self.family.add_attribute(a)
else:
func = self.family_func.get(matches[1], self.func_family_event)
func(self.family, matches, 2)
if matches[1] not in (TOKEN_ENDL, TOKEN_BAPL, TOKEN_CONL):
func = self.family_func.get(matches[1], self.func_family_event)
func(self.family, matches, 2)
# handle addresses attached to families
if self.addr != None:

View File

@ -859,6 +859,11 @@ class ViewManager:
self.page_is_changing = False
def import_pkg(self, filename):
import ReadPkg
ReadPkg.impData(self.state.db, filename, self.uistate.pulse_progressbar)
self.post_load()
def import_data(self, obj):
if self.state.db.db_is_open:
self.db_loader.import_file()