From 6e7c46ba8ae9b80821600a15575fc580e787ce47 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 8 Sep 2003 12:14:34 +0000 Subject: [PATCH] * src/gramps_main.py (__init__): Pass parent window to DbPrompter. * src/DbPrompter.py (show): Gracefully deal with empty parent. svn: r2106 --- ChangeLog | 4 ++++ src/DbPrompter.py | 5 +++-- src/gramps_main.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29df401a4..ccd1d3e38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-09-08 Alex Roitman + * src/gramps_main.py (__init__): Pass parent window to DbPrompter. + * src/DbPrompter.py (show): Gracefully deal with empty parent. + 2003-09-07 Don Allingham * src/docgen/PdfDoc.py: handle multiple image classes defined by reportlab diff --git a/src/DbPrompter.py b/src/DbPrompter.py index 7a5355a0c..9f12540bb 100644 --- a/src/DbPrompter.py +++ b/src/DbPrompter.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -60,7 +60,8 @@ class DbPrompter: def show(self): opendb = gtk.glade.XML(const.gladeFile, "opendb","gramps") top = opendb.get_widget('opendb') - top.set_transient_for(self.parent) + if self.parent: + top.set_transient_for(self.parent) title = opendb.get_widget('title') Utils.set_titles(top,title,_('Open a database')) diff --git a/src/gramps_main.py b/src/gramps_main.py index cf4a163cb..852712ee0 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -272,7 +272,7 @@ class Gramps: self.auto_save_load(GrampsCfg.lastfile) else: import DbPrompter - DbPrompter.DbPrompter(self,0) + DbPrompter.DbPrompter(self,0,self.topWindow) if self.db.need_autosave() and GrampsCfg.autosave_int != 0: Utils.enable_autosave(self.autosave_database,