* src/gramps_main.py (__init__): Pass parent window to DbPrompter.

* src/DbPrompter.py (show): Gracefully deal with empty parent.


svn: r2106
This commit is contained in:
Alex Roitman 2003-09-08 12:14:34 +00:00
parent b29826cdbb
commit 6e7c46ba8a
3 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2003-09-08 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps_main.py (__init__): Pass parent window to DbPrompter.
* src/DbPrompter.py (show): Gracefully deal with empty parent.
2003-09-07 Don Allingham <dallingham@users.sourceforge.net> 2003-09-07 Don Allingham <dallingham@users.sourceforge.net>
* src/docgen/PdfDoc.py: handle multiple image classes defined * src/docgen/PdfDoc.py: handle multiple image classes defined
by reportlab by reportlab

View File

@ -1,7 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -60,7 +60,8 @@ class DbPrompter:
def show(self): def show(self):
opendb = gtk.glade.XML(const.gladeFile, "opendb","gramps") opendb = gtk.glade.XML(const.gladeFile, "opendb","gramps")
top = opendb.get_widget('opendb') 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') title = opendb.get_widget('title')
Utils.set_titles(top,title,_('Open a database')) Utils.set_titles(top,title,_('Open a database'))

View File

@ -272,7 +272,7 @@ class Gramps:
self.auto_save_load(GrampsCfg.lastfile) self.auto_save_load(GrampsCfg.lastfile)
else: else:
import DbPrompter import DbPrompter
DbPrompter.DbPrompter(self,0) DbPrompter.DbPrompter(self,0,self.topWindow)
if self.db.need_autosave() and GrampsCfg.autosave_int != 0: if self.db.need_autosave() and GrampsCfg.autosave_int != 0:
Utils.enable_autosave(self.autosave_database, Utils.enable_autosave(self.autosave_database,