From 86b78e5c3c2a8bed53fd25005323cb67d6caa9eb Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 21 Jun 2004 23:22:55 +0000 Subject: [PATCH] * src/ArgHandler.py: Fixes. * src/gramps_main.py: Don't show topWindow until ArgHandler is done. * src/plugins/Summary.py: Fixes. svn: r3224 --- gramps2/ChangeLog | 4 ++++ gramps2/src/ArgHandler.py | 2 +- gramps2/src/gramps_main.py | 6 +++++- gramps2/src/plugins/Summary.py | 5 ++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a2adc8f57..e99da21b4 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -5,6 +5,10 @@ in the context menu. * NEWS: Update. + * src/ArgHandler.py: Fixes. + * src/gramps_main.py: Don't show topWindow until ArgHandler is done. + * src/plugins/Summary.py: Fixes. + 2004-06-20 Alex Roitman * configure.in: Bump up the version number. * src/gramps.py: Pass complete argument string. diff --git a/gramps2/src/ArgHandler.py b/gramps2/src/ArgHandler.py index 3b5f975bf..47e15ffa5 100644 --- a/gramps2/src/ArgHandler.py +++ b/gramps2/src/ArgHandler.py @@ -421,7 +421,7 @@ class ArgHandler: """ if action == 'check': import Check - checker = Check.CheckIntegrity(self.parent.db) + checker = Check.CheckIntegrity(self.parent.db,None,None) checker.check_for_broken_family_links() checker.cleanup_missing_photos(1) checker.check_parent_relationships() diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 075caed0b..8cc021a90 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -149,6 +149,11 @@ class Gramps: ArgHandler.ArgHandler(self,args) + # Don't show main window until ArgHandler is done. + # This prevents a window from annoyingly popping up when + # the command line args are sufficient to operate without it. + self.topWindow.show() + if GrampsCfg.usetips: TipOfDay.TipOfDay() @@ -352,7 +357,6 @@ class Gramps: self.back = gtk.ImageMenuItem(gtk.STOCK_GO_BACK) self.forward = gtk.ImageMenuItem(gtk.STOCK_GO_FORWARD) - self.topWindow.show() self.enable_toolbar(self.use_toolbar) def undo(self,*args): diff --git a/gramps2/src/plugins/Summary.py b/gramps2/src/plugins/Summary.py index 3ff8ab0d6..527c10537 100644 --- a/gramps2/src/plugins/Summary.py +++ b/gramps2/src/plugins/Summary.py @@ -78,7 +78,10 @@ def build_report(database,person): notfound.append(photo.get_path()) for person_id in personList: - length = len(person.get_media_list()) + person = database.try_to_find_person_from_id(person_id) + if not person: + continue + length = len(person.get_media_list()) if length > 0: with_photos = with_photos + 1 total_photos = total_photos + length