From adbf4b1dac6362d395ac131b7644eee47eaaf38a Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 28 Mar 2007 02:47:03 +0000 Subject: [PATCH] Remove "enable_options()" from the report interface. All reports define all their own options. So it is not used. svn: r8329 --- ChangeLog | 9 +++++++++ src/PluginUtils/_Options.py | 20 -------------------- src/PluginUtils/_Tool.py | 4 ---- src/ReportBase/_ReportOptions.py | 4 ---- src/plugins/AncestorChart2.py | 4 ---- src/plugins/DescendChart.py | 4 ---- 6 files changed, 9 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index b356fd1b2..1f3f81b00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-03-27 Brian Matherly + * src/ReportBase/_ReportOptions.py + * src/plugins/DescendChart.py + * src/plugins/AncestorChart2.py + * src/PluginUtils/_Options.py + * src/PluginUtils/_Tool.py + Remove "enable_options()" from the report interface. All reports define all + their own options. So it is not used. + 2007-03-27 Zsolt Foldvari * src/GrampsDb/_DbUtils.py (db_copy): include missing Note table; handling Note bookmarks. diff --git a/src/PluginUtils/_Options.py b/src/PluginUtils/_Options.py index 8733a66a0..c673b5ac3 100644 --- a/src/PluginUtils/_Options.py +++ b/src/PluginUtils/_Options.py @@ -407,10 +407,6 @@ class Options: Subclasses MUST call this in their __init__() method. """ self.set_new_options() - self.enable_options() - - if self.enable_dict: - self.options_dict.update(self.enable_dict) self.handler = OptionHandler(name,self.options_dict,person_id) def set_new_options(self): @@ -442,22 +438,6 @@ class Options: self.options_dict = {} self.options_help = {} - def enable_options(self): - """ - Enables semi-common options for this module. - - The semi-common option is the option which GRAMPS is aware of, - but not common enough to be present in all modules. - - A self.enable_dict dictionary MUST be defined here, whose keys - are the valid semi-common keys above, and whose values are the - desired default values for semi-commons. - - NOTE: If a particular module does not use semi-common options, - then it should not override this method. - """ - self.enable_dict = {} - def add_user_options(self,dialog): """ Sets up UI controls (widgets) for the options specific for this modul. diff --git a/src/PluginUtils/_Tool.py b/src/PluginUtils/_Tool.py index 319529ffb..a601d618e 100644 --- a/src/PluginUtils/_Tool.py +++ b/src/PluginUtils/_Tool.py @@ -310,8 +310,4 @@ class ToolOptions(Options): Subclasses MUST call this in their __init__() method. """ self.set_new_options() - self.enable_options() - - if self.enable_dict: - self.options_dict.update(self.enable_dict) self.handler = ToolOptionHandler(name,self.options_dict,person_id) diff --git a/src/ReportBase/_ReportOptions.py b/src/ReportBase/_ReportOptions.py index 905eda7f0..8961e6ed4 100644 --- a/src/ReportBase/_ReportOptions.py +++ b/src/ReportBase/_ReportOptions.py @@ -475,10 +475,6 @@ class ReportOptions(_Options.Options): """ self.set_new_options() - self.enable_options() - - if self.enable_dict: - self.options_dict.update(self.enable_dict) self.handler = OptionHandler(name,self.options_dict,person_id) def make_default_style(self,default_style): diff --git a/src/plugins/AncestorChart2.py b/src/plugins/AncestorChart2.py index 20239e223..b84a3f123 100644 --- a/src/plugins/AncestorChart2.py +++ b/src/plugins/AncestorChart2.py @@ -466,10 +466,6 @@ class AncestorChartOptions(ReportOptions): True), } - def enable_options(self): - # Semi-common options that should be enabled for this report - self.enable_dict = {} - def add_user_options(self,dialog): """ Override the base class add_user_options task to add a menu that allows diff --git a/src/plugins/DescendChart.py b/src/plugins/DescendChart.py index 1da42d894..b055e0ad0 100644 --- a/src/plugins/DescendChart.py +++ b/src/plugins/DescendChart.py @@ -418,10 +418,6 @@ class DescendChartOptions(ReportOptions): True), } - def enable_options(self): - # Semi-common options that should be enabled for this report - self.enable_dict = {} - def add_user_options(self,dialog): """ Override the base class add_user_options task to add a menu that allows