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:
parent
abbd6781c1
commit
2f918cf16a
@ -196,8 +196,10 @@ class CLIDbManager:
|
|||||||
newdb = gen.db.GrampsDBDir()
|
newdb = gen.db.GrampsDBDir()
|
||||||
newdb.write_version(new_path)
|
newdb.write_version(new_path)
|
||||||
|
|
||||||
self.current_names.append((title, new_path, path_name, _("Never"), 0,
|
(tval, last) = time_val(new_path)
|
||||||
False, ""))
|
|
||||||
|
self.current_names.append((title, new_path, path_name,
|
||||||
|
last, tval, False, ""))
|
||||||
return new_path, title
|
return new_path, title
|
||||||
|
|
||||||
def _create_new_db(self, title=None):
|
def _create_new_db(self, title=None):
|
||||||
@ -831,8 +833,9 @@ class DbManager(CLIDbManager):
|
|||||||
"""
|
"""
|
||||||
new_path, title = self._create_new_db_cli(title)
|
new_path, title = self._create_new_db_cli(title)
|
||||||
path_name = os.path.join(new_path, NAME_FILE)
|
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,
|
node = self.model.append(None, [title, new_path, path_name,
|
||||||
_("Never"), 0, False, ''])
|
last, tval, False, ''])
|
||||||
self.selection.select_iter(node)
|
self.selection.select_iter(node)
|
||||||
path = self.model.get_path(node)
|
path = self.model.get_path(node)
|
||||||
self.dblist.set_cursor(path, focus_column=self.column,
|
self.dblist.set_cursor(path, focus_column=self.column,
|
||||||
|
Loading…
Reference in New Issue
Block a user