* src/DbState.py: Added new class to keep track of database

status
* src/PageView.py: base class for pluggable views
* src/PersonView.py: new version of PeopleView
* src/ViewManager.py: view and database management class


svn: r5040
This commit is contained in:
Don Allingham
2005-08-09 04:41:20 +00:00
parent f1b3c2c39f
commit 3e153e8f6e
13 changed files with 1917 additions and 1979 deletions

View File

@@ -313,7 +313,7 @@ class ArgHandler:
# the InMem formats, without setting up a new database. Then
# go on and process the rest of the command line arguments.
self.parent.cl = bool(self.exports or self.actions)
#self.parent.cl = bool(self.exports or self.actions)
name,format = self.open
success = False
@@ -339,7 +339,7 @@ class ArgHandler:
os._exit(1)
if self.imports:
self.parent.cl = bool(self.exports or self.actions or self.parent.cl)
#self.parent.cl = bool(self.exports or self.actions or self.parent.cl)
# Create dir for imported database(s)
self.impdir_path = os.path.expanduser("~/.gramps/import" )
@@ -373,33 +373,29 @@ class ArgHandler:
"supply at least one input file to process."
print "Launching interactive session..."
if self.parent.cl:
for expt in self.exports:
print "Exporting: file %s, format %s." % expt
self.cl_export(expt[0],expt[1])
# if self.parent.cl:
# for expt in self.exports:
# print "Exporting: file %s, format %s." % expt
# self.cl_export(expt[0],expt[1])
for (action,options_str) in self.actions:
print "Performing action: %s." % action
if options_str:
print "Using options string: %s" % options_str
self.cl_action(action,options_str)
# for (action,options_str) in self.actions:
# print "Performing action: %s." % action
# if options_str:
# print "Using options string: %s" % options_str
# self.cl_action(action,options_str)
print "Cleaning up."
# remove import db after use
self.parent.db.close()
if self.imports:
os.remove(self.imp_db_path)
print "Exiting."
os._exit(0)
# print "Cleaning up."
# # remove import db after use
# self.parent.db.close()
# if self.imports:
# os.remove(self.imp_db_path)
# print "Exiting."
# os._exit(0)
if self.imports:
self.parent.import_tool_callback()
elif GrampsKeys.get_lastfile() and GrampsKeys.get_autoload():
if self.auto_save_load(GrampsKeys.get_lastfile()) == 0:
DbPrompter.DbPrompter(self.parent,0)
else:
DbPrompter.DbPrompter(self.parent,0)
self.auto_save_load(GrampsKeys.get_lastfile())
#-------------------------------------------------------------------------
#