2007-12-29 Benny Malengier <benny.malengier@gramps-project.org>

* src/ArgHandler.py: better handling of -l
	* src/const.py.in: forgot to commit this, new constants
	* configure.in: remove GrampsDb makefile
	* src/DbManager.py: allow inheriting create_new_db_cli


svn: r9625
This commit is contained in:
Benny Malengier 2007-12-29 14:47:38 +00:00
parent 06b6d1af03
commit fb60df120a
5 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2007-12-29 Benny Malengier <benny.malengier@gramps-project.org>
* src/ArgHandler.py: better handling of -l
* src/const.py.in: forgot to commit this, new constants
* configure.in: remove GrampsDb makefile
* src/DbManager.py: allow inheriting create_new_db_cli
Rerun ./autogen.sh !!
2007-12-29 Douglas S. Blank <dblank@saliva.brynmawr.edu>
* src/DataViews/MyGrampsView.py: renamed background to main
* src/plugins/DefaultGadgets.py: call main (generator)

View File

@ -152,7 +152,6 @@ src/DisplayTabs/Makefile
src/DisplayModels/Makefile
src/Selectors/Makefile
src/GrampsLogger/Makefile
src/GrampsDb/Makefile
src/Merge/Makefile
src/docgen/Makefile
src/Editors/Makefile

View File

@ -316,7 +316,8 @@ class ArgHandler:
print 'List of known family trees in your database path\n'
dbman = CLIDbManager(self.state)
for name, dirname in dbman.family_tree_list():
print name, ', in dir ', dirname
print dirname, ', with name ', name
sys.exit(0)
if self.open_gui:
# Filename was given as gramps FILENAME.
# Open a session with that file. Forget the rest of given arguments
@ -450,8 +451,8 @@ class ArgHandler:
elif Config.get(Config.RECENT_FILE) and Config.get(Config.AUTOLOAD):
filename = Config.get(Config.RECENT_FILE)
self.vm.db_loader.read_file(filename, const.APP_GRAMPS)
return (filename, const.APP_GRAMPS)
self.vm.db_loader.read_file(filename)
return (filename, const.APP_FAMTREE)
#if os.path.isfile(rf):
# filetype = Mime.get_type(rf)

View File

@ -175,7 +175,7 @@ class CLIDbManager:
"""
print _('Import finished...')
def __create_new_db_cli(self, title=None):
def _create_new_db_cli(self, title=None):
"""
Create a new database.
"""
@ -200,7 +200,7 @@ class CLIDbManager:
"""
Create a new database, do extra stuff needed
"""
return self.__create_new_db_cli(title)
return self._create_new_db_cli(title)
def import_new_db(self, filetype, filename, callback):
if filetype in IMPORT_TYPES:
@ -760,7 +760,7 @@ class DbManager(CLIDbManager):
"""
Create a new database, append to model
"""
new_path = self.__create_new_db_cli(title)
new_path = self._create_new_db_cli(title)
path_name = os.path.join(new_path, NAME_FILE)
node = self.model.append(None, [title, new_path, path_name,
_("Never"), 0, False, ''])

View File

@ -49,6 +49,7 @@ URL_MANUAL = "http://gramps-project.org/gramps-manual/2.2/"
# Mime Types
#
#-------------------------------------------------------------------------
APP_FAMTREE = 'x-directory/normal'
APP_GRAMPS = "application/x-gramps"
APP_GRAMPS_XML = "application/x-gramps-xml"
APP_GEDCOM = "application/x-gedcom"
@ -144,7 +145,7 @@ else:
#-------------------------------------------------------------------------
PROGRAM_NAME = "GRAMPS"
VERSION = "@VERSIONSTRING@"
COPYRIGHT_MSG = unicode("© 2001-2006 Donald N. Allingham", "iso-8859-1")
COPYRIGHT_MSG = unicode("<EFBFBD> 2001-2006 Donald N. Allingham", "iso-8859-1")
COMMENTS = _("GRAMPS (Genealogical Research and Analysis "
"Management Programming System) is a personal "
"genealogy program.")
@ -229,5 +230,5 @@ LONGOPTS = [
"debug=",
]
SHORTOPTS = "O:i:o:f:a:p:d:?"
SHORTOPTS = "O:i:o:f:a:p:d:?:l"