diff --git a/ChangeLog b/ChangeLog index 3c5ee6c65..06b828849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-24 Brian Matherly + * src/PluginUtils/_GuiOptions.py: + * src/ReportBase/_BareReportDialog.py: + * src/ReportBase/_ReportOptions.py: + Remove the use of dbstate. + 2008-01-24 Douglas S. Blank * src/GrampsCfg.py: missing const; added Text tab * src/Config/_GrampsConfigKeys.py: added missing and private text diff --git a/src/PluginUtils/_GuiOptions.py b/src/PluginUtils/_GuiOptions.py index 74edc3642..4e4a50b99 100644 --- a/src/PluginUtils/_GuiOptions.py +++ b/src/PluginUtils/_GuiOptions.py @@ -853,9 +853,8 @@ class GuiMenuOptions: A GuiMenuOptions is used to implement the necessary funtions for adding options to a GTK dialog. """ - def __init__(self, dbstate): + def __init__(self): self.menu = _MenuOptions.Menu() - self.__dbstate = dbstate # Fill options_dict with report/tool defaults: self.options_dict = {} @@ -906,44 +905,44 @@ class GuiMenuOptions: found = True label = True if isinstance(option, _MenuOptions.PersonOption): - widget = GuiPersonOption(option, self.__dbstate, + widget = GuiPersonOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.NumberOption): - widget = GuiNumberOption(option, self.__dbstate, + widget = GuiNumberOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.BooleanOption): - widget = GuiBooleanOption(option, self.__dbstate, + widget = GuiBooleanOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) label = False elif isinstance(option, _MenuOptions.StringOption): - widget = GuiStringOption(option, self.__dbstate, + widget = GuiStringOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.EnumeratedListOption): - widget = GuiEnumeratedListOption(option, self.__dbstate, + widget = GuiEnumeratedListOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.TextOption): - widget = GuiTextOption(option, self.__dbstate, + widget = GuiTextOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.FamilyOption): - widget = GuiFamilyOption(option, self.__dbstate, + widget = GuiFamilyOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.PersonListOption): - widget = GuiPersonListOption(option, self.__dbstate, + widget = GuiPersonListOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.ColourOption): - widget = GuiColourOption(option, self.__dbstate, + widget = GuiColourOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) elif isinstance(option, _MenuOptions.SurnameColourOption): - widget = GuiSurnameColourOption(option, self.__dbstate, + widget = GuiSurnameColourOption(option, dialog.dbstate, dialog.uistate, dialog.track, self.__tooltips) else: diff --git a/src/ReportBase/_BareReportDialog.py b/src/ReportBase/_BareReportDialog.py index c28b03e45..e88843469 100644 --- a/src/ReportBase/_BareReportDialog.py +++ b/src/ReportBase/_BareReportDialog.py @@ -87,7 +87,7 @@ class BareReportDialog(ManagedWindow.ManagedWindow): def init_options(self,option_class): if type(option_class) == ClassType: - self.options = option_class(self.raw_name,self.dbstate) + self.options = option_class(self.raw_name, self.db) elif type(option_class) == InstanceType: self.options = option_class diff --git a/src/ReportBase/_ReportOptions.py b/src/ReportBase/_ReportOptions.py index 84e6f2d44..507d51aa3 100644 --- a/src/ReportBase/_ReportOptions.py +++ b/src/ReportBase/_ReportOptions.py @@ -784,11 +784,12 @@ class MenuReportOptions(GuiMenuOptions,ReportOptions): """ def __init__(self, name, dbase): ReportOptions.__init__(self, name, None) - GuiMenuOptions.__init__(self, dbase) + GuiMenuOptions.__init__(self) def load_previous_values(self): ReportOptions.load_previous_values(self) - # Pass the loaded values to the menu options so they will be displayed properly. + # Pass the loaded values to the menu options so they will be displayed + # properly. for optname in self.options_dict: menu_option = self.menu.get_option_by_name(optname) menu_option.set_value(self.options_dict[optname])