diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index c7caebd57..cd690d551 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2005-01-25 Alex Roitman + * src/TipOfDay.py (TipOfDay.__init__): Set transent property. + * src/gramps_main.py (Gramnps.__init__): Pass itself to TipOfDay; + (on_show_plugin_status,build_plugin_menus): Pass itself to PluginStatus. + * src/Plugins.py (PluginStatus.__init__): Set transent property. + 2005-01-25 Eero Tamminen * src/plugins/StatisticsChart.py: - Comment out debug output diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index 3ec472af6..596768da1 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -347,14 +347,17 @@ class ToolPlugins(PluginDialog): # #------------------------------------------------------------------------- status_up = None +parent_window = None class PluginStatus: """Displays a dialog showing the status of loaded plugins""" - def __init__(self): - global status_up + def __init__(self,parent_class=None): + global status_up, parent_window if status_up: status_up.close(None) + if parent_class: + parent_window = parent_class.topWindow status_up = self import cStringIO @@ -375,6 +378,9 @@ class PluginStatus: 'on_plugstat_delete_event' : self.on_delete, }) + if parent_window: + self.top.set_transient_for(parent_window) + info = cStringIO.StringIO() if len(PluginMgr.expect_list) + len(PluginMgr.failmsg_list) == 0: diff --git a/gramps2/src/TipOfDay.py b/gramps2/src/TipOfDay.py index 9bd6cd757..47ff476e2 100644 --- a/gramps2/src/TipOfDay.py +++ b/gramps2/src/TipOfDay.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 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 @@ -50,7 +50,7 @@ import GrampsKeys # #------------------------------------------------------------------------- class TipOfDay: - def __init__(self): + def __init__(self,parent): xml = gtk.glade.XML(const.gladeFile, "tod", "gramps") top = xml.get_widget("tod") tip = xml.get_widget("tip") @@ -63,6 +63,8 @@ class TipOfDay: new_index = range(len(tip_list)) Random().shuffle(new_index) + top.set_transient_for(parent.topWindow) + index = 0 rval = 0 while rval == 0: diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 2d9f1a444..4babb733b 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -173,7 +173,7 @@ class Gramps: self.topWindow.show() if GrampsKeys.get_usetips(): - TipOfDay.TipOfDay() + TipOfDay.TipOfDay(self) self.db.set_researcher(GrampsCfg.get_researcher()) @@ -794,7 +794,7 @@ class Gramps: self.edit_item.set_sensitive(val) def on_show_plugin_status(self,obj): - Plugins.PluginStatus() + Plugins.PluginStatus(self) def on_sidebar_activate(self,obj): self.enable_sidebar(obj.get_active()) @@ -839,7 +839,7 @@ class Gramps: error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/plugins")) if GrampsKeys.get_pop_plugin_status() and error: - Plugins.PluginStatus() + Plugins.PluginStatus(self) Plugins.build_report_menu(self.report_menu,self.menu_report) Plugins.build_tools_menu(self.tools_menu,self.menu_tools)