Refactoring the report system: reports no longer require dbstate.
svn: r9924
This commit is contained in:
@@ -48,7 +48,8 @@ class CommandLineReport:
|
||||
noopt=False):
|
||||
self.database = database
|
||||
self.category = category
|
||||
self.option_class = option_class(name)
|
||||
self.option_class = option_class(name, database)
|
||||
self.option_class.load_previous_values()
|
||||
self.show = options_str_dict.pop('show',None)
|
||||
self.options_str_dict = options_str_dict
|
||||
self.init_options(noopt)
|
||||
|
||||
@@ -782,13 +782,9 @@ class MenuReportOptions(GuiMenuOptions,ReportOptions):
|
||||
MenuReportOptions class will worry about setting up the GUI.
|
||||
|
||||
"""
|
||||
def __init__(self,name,dbstate=None):
|
||||
if dbstate:
|
||||
active_person = dbstate.get_active_person().get_gramps_id()
|
||||
else:
|
||||
active_person = None
|
||||
ReportOptions.__init__(self,name,active_person)
|
||||
GuiMenuOptions.__init__(self,dbstate)
|
||||
def __init__(self, name, dbase):
|
||||
ReportOptions.__init__(self, name, None)
|
||||
GuiMenuOptions.__init__(self, dbase)
|
||||
|
||||
def load_previous_values(self):
|
||||
ReportOptions.load_previous_values(self)
|
||||
|
||||
Reference in New Issue
Block a user