From 61423c75500f7e9b8b0e3bd358e8b08c006028ec Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 19 Oct 2001 00:25:45 +0000 Subject: [PATCH] Revision handling improvements svn: r488 --- src/gramps_main.py | 55 +++++++++------------------------------------- 1 file changed, 10 insertions(+), 45 deletions(-) diff --git a/src/gramps_main.py b/src/gramps_main.py index 3ec846598..7b3df465d 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -696,51 +696,6 @@ def read_file(filename): statusbar.set_status("") Config.save_last_file("") - active_person = None - for person in database.getPersonMap().values(): - if active_person == None: - active_person = person - lastname = person.getPrimaryName().getSurname() - if lastname and lastname not in const.surnames: - const.surnames.append(lastname) - - statusbar.set_progress(1.0) - full_update() - statusbar.set_progress(0.0) - -#------------------------------------------------------------------------- -# -# -# -#------------------------------------------------------------------------- -def read_revision(filename,rev): - base = os.path.basename(filename) - if base == const.indexFile: - filename = os.path.dirname(filename) - elif not os.path.isdir(filename): - displayError(_("%s is not a directory") % filename) - return - - statusbar.set_status(_("Loading %s ...") % filename) - - if load_database(filename) == 1: - topWindow.set_title("%s - %s" % (_("Gramps"),filename)) - else: - statusbar.set_status("") - Config.save_last_file("") - - active_person = None - for person in database.getPersonMap().values(): - if active_person == None: - active_person = person - lastname = person.getPrimaryName().getSurname() - if lastname and lastname not in const.surnames: - const.surnames.append(lastname) - - statusbar.set_progress(1.0) - full_update() - statusbar.set_progress(0.0) - #------------------------------------------------------------------------- # # Called from the fileselector, when the OK button is pressed (Save @@ -1879,6 +1834,16 @@ def post_load(name): person = database.getDefaultPerson() if person: active_person = person + for person in database.getPersonMap().values(): + if active_person == None: + active_person = person + lastname = person.getPrimaryName().getSurname() + if lastname and lastname not in const.surnames: + const.surnames.append(lastname) + + statusbar.set_progress(1.0) + full_update() + statusbar.set_progress(0.0) return 1 #-------------------------------------------------------------------------