From ae1ec18797b05c6086972df6f362b7792ddcf2a4 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 21 Dec 2006 04:42:37 +0000 Subject: [PATCH] 2006-12-20 Alex Roitman * src/PluginUtils/_Plugins.py (PluginDialog.__init__): Connect to signal in the parent class. svn: r7831 --- gramps2/ChangeLog | 4 ++++ gramps2/src/PluginUtils/_Plugins.py | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0ca97b47a..72b06c014 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-12-20 Alex Roitman + * src/PluginUtils/_Plugins.py (PluginDialog.__init__): Connect to + signal in the parent class. + 2006-12-20 Don Allingham * src/DataViews/_PersonView.py: use a container for bookmarks to prevent lost of data (bug #777) diff --git a/gramps2/src/PluginUtils/_Plugins.py b/gramps2/src/PluginUtils/_Plugins.py index 93b9a2ea5..20bda8f6f 100644 --- a/gramps2/src/PluginUtils/_Plugins.py +++ b/gramps2/src/PluginUtils/_Plugins.py @@ -137,8 +137,13 @@ class PluginDialog(ManagedWindow.ManagedWindow): self.item = None self.build_plugin_tree(item_list,categories) + uistate.connect('plugins-reloaded',self.rebuild) self.show() + def rebuild(self,tool_list,report_list): + # This method needs to be overridden in the subclass + assert False, "This method needs to be overridden in the subclass." + def build_menu_names(self,obj): return (self.msg,None) @@ -266,9 +271,8 @@ class ReportPlugins(PluginDialog): _("Select a report from those available on the left."), _("_Generate"), _("Generate selected report"), REPORTS) - uistate.connect('plugins-reloaded',self.rebuild_reports) - def rebuild_reports(self,tool_list,report_list): + def rebuild(self,tool_list,report_list): self.build_plugin_tree(report_list,standalone_categories) #------------------------------------------------------------------------- @@ -300,10 +304,8 @@ class ToolPlugins(PluginDialog): _("_Run"), _("Run selected tool"), TOOLS) - - uistate.connect('plugins-reloaded',self.rebuild_tools) - def rebuild_tools(self,tool_list,report_list): + def rebuild(self,tool_list,report_list): self.build_plugin_tree(tool_list,_Tool.tool_categories) #-------------------------------------------------------------------------