* 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.


svn: r3963
This commit is contained in:
Alex Roitman 2005-01-25 21:25:15 +00:00
parent e92157a658
commit 91e111b8fc
4 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2005-01-25 Alex Roitman <shura@alex.neuro.umn.edu>
* 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 <eerot@sf>
* src/plugins/StatisticsChart.py:
- Comment out debug output

View File

@ -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:

View File

@ -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:

View File

@ -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)