diff --git a/ChangeLog b/ChangeLog index 0ca97b47a..72b06c014 100644 --- a/ChangeLog +++ b/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/src/PluginUtils/_Plugins.py b/src/PluginUtils/_Plugins.py index 93b9a2ea5..20bda8f6f 100644 --- a/src/PluginUtils/_Plugins.py +++ b/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) #-------------------------------------------------------------------------