import cleanup & doc fixes

svn: r12974
This commit is contained in:
Raphael Ackermann 2009-08-12 09:56:07 +00:00
parent 5e0cc4cd1e
commit d5f186e3ee
2 changed files with 10 additions and 13 deletions

View File

@ -329,7 +329,7 @@ class ArgHandler(object):
""" """
Take action for all given to import files. Note: Family trees are not Take action for all given to import files. Note: Family trees are not
supported. supported.
If a fam tree is open, the import happens on top of it. If not open, If a family tree is open, the import happens on top of it. If not open,
a new family tree is created, and the import done. If this is CLI, a new family tree is created, and the import done. If this is CLI,
the created tree is deleted at the end (as some action will have the created tree is deleted at the end (as some action will have
happened that is now finished), if this is GUI, it is opened. happened that is now finished), if this is GUI, it is opened.
@ -349,7 +349,7 @@ class ArgHandler(object):
try: try:
self.sm.open_activate(self.imp_db_path) self.sm.open_activate(self.imp_db_path)
print "Created empty fam tree successfully" print "Created empty family tree successfully"
except: except:
print "Error opening the file." print "Error opening the file."
print "Exiting..." print "Exiting..."
@ -361,8 +361,8 @@ class ArgHandler(object):
def __open_action(self): def __open_action(self):
""" """
Take action on a Fam tree dir to open. It will be opened in the Take action on a family tree dir to open. It will be opened in the
sessionmanager session manager
""" """
if self.open: if self.open:
# Family Tree to open was given. Open it # Family Tree to open was given. Open it

View File

@ -67,14 +67,11 @@ import pango
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
from QuestionDialog import ErrorDialog, QuestionDialog from QuestionDialog import ErrorDialog, QuestionDialog
import gen.db from gen.db import GrampsDBDir
from gen.plug import PluginManager from gen.plug import PluginManager
from cli.clidbman import * from cli.clidbman import CLIDbManager, NAME_FILE, time_val
import GrampsDbUtils import GrampsDbUtils
import Config
import Mime
from DdTargets import DdTargets from DdTargets import DdTargets
import RecentFiles import RecentFiles
from glade import Glade from glade import Glade
@ -278,7 +275,7 @@ class DbManager(CLIDbManager):
stock_id=STOCK_COL) stock_id=STOCK_COL)
self.dblist.append_column(icon_column) self.dblist.append_column(icon_column)
# build the last modified cocolumn # build the last modified column
render = gtk.CellRendererText() render = gtk.CellRendererText()
column = gtk.TreeViewColumn(_('Last modified'), render, text=DATE_COL) column = gtk.TreeViewColumn(_('Last modified'), render, text=DATE_COL)
column.set_sort_column_id(DSORT_COL) column.set_sort_column_id(DSORT_COL)
@ -511,7 +508,7 @@ class DbManager(CLIDbManager):
new_path, newname = self._create_new_db("%s : %s" % (parent_name, name)) new_path, newname = self._create_new_db("%s : %s" % (parent_name, name))
self.__start_cursor(_("Extracting archive...")) self.__start_cursor(_("Extracting archive..."))
dbclass = gen.db.GrampsDBDir dbclass = GrampsDBDir
dbase = dbclass() dbase = dbclass()
dbase.load(new_path, None) dbase.load(new_path, None)
@ -635,10 +632,10 @@ class DbManager(CLIDbManager):
fname = os.path.join(dirname, filename) fname = os.path.join(dirname, filename)
os.unlink(fname) os.unlink(fname)
newdb = gen.db.GrampsDBDir() newdb = GrampsDBDir()
newdb.write_version(dirname) newdb.write_version(dirname)
dbclass = gen.db.GrampsDBDir dbclass = GrampsDBDir
dbase = dbclass() dbase = dbclass()
dbase.set_save_path(dirname) dbase.set_save_path(dirname)
dbase.load(dirname, None) dbase.load(dirname, None)