Use real timestamp instead of 'Never' for newly created DBs.

This is needed because when the DBManager is re-opened after a new DB has been
created the timestamp would replace the 'Never' string anyway without opening
the DB, since now we always have metadata table created.


svn: r10488
This commit is contained in:
Zsolt Foldvari 2008-04-05 22:30:17 +00:00
parent abbd6781c1
commit 2f918cf16a

View File

@ -196,8 +196,10 @@ class CLIDbManager:
newdb = gen.db.GrampsDBDir()
newdb.write_version(new_path)
self.current_names.append((title, new_path, path_name, _("Never"), 0,
False, ""))
(tval, last) = time_val(new_path)
self.current_names.append((title, new_path, path_name,
last, tval, False, ""))
return new_path, title
def _create_new_db(self, title=None):
@ -831,8 +833,9 @@ class DbManager(CLIDbManager):
"""
new_path, title = self._create_new_db_cli(title)
path_name = os.path.join(new_path, NAME_FILE)
(tval, last) = time_val(new_path)
node = self.model.append(None, [title, new_path, path_name,
_("Never"), 0, False, ''])
last, tval, False, ''])
self.selection.select_iter(node)
path = self.model.get_path(node)
self.dblist.set_cursor(path, focus_column=self.column,