diff --git a/src/cli/grampscli.py b/src/cli/grampscli.py index edb7b8d99..558530ca9 100644 --- a/src/cli/grampscli.py +++ b/src/cli/grampscli.py @@ -187,7 +187,6 @@ class CLIManager(object): """ def __init__(self, dbstate, setloader): self.dbstate = dbstate - self.db_name = None if setloader: self.db_loader = CLIDbLoader(self.dbstate) else: @@ -250,7 +249,7 @@ class CLIManager(object): if filename[-1] == os.path.sep: filename = filename[:-1] name = os.path.basename(filename) - self.db_name = title + self.dbstate.db.db_name = title if title: name = title diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index f6b36911e..e9bdb26c3 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -844,17 +844,6 @@ class ViewManager(CLIManager): if not self.dbstate.db.is_open() and show_manager: self.__open_activate(None) - def post_load_newdb(self, filename, filetype): - # Attempt to figure out the database title - path = os.path.join(filename, "name.txt") - try: - ifile = open(path) - title = ifile.readline().strip() - ifile.close() - except: - title = filename - self._post_load_newdb(filename, filetype, title) - def do_load_plugins(self): """ Loads the plugins at initialization time. The plugin status window is @@ -1251,7 +1240,6 @@ class ViewManager(CLIManager): if filename[-1] == os.path.sep: filename = filename[:-1] name = os.path.basename(filename) - self.dbstate.db.db_name = title if title: name = title