Refactoring the report system: reports no longer require dbstate.
svn: r9924
This commit is contained in:
@ -475,13 +475,13 @@ class CalendarReport(Calendar):
|
||||
|
||||
class CalendarOptions(MenuReportOptions):
|
||||
""" Calendar options for graphic calendar """
|
||||
def __init__(self, name, dbstate=None):
|
||||
self.__dbstate = dbstate
|
||||
def __init__(self, name, dbase):
|
||||
self.__db = dbase
|
||||
self.__pid = None
|
||||
self.__filter = None
|
||||
MenuReportOptions.__init__(self, name, dbstate)
|
||||
MenuReportOptions.__init__(self, name, dbase)
|
||||
|
||||
def add_menu_options(self, menu, dbstate):
|
||||
def add_menu_options(self, menu):
|
||||
""" Adds the options for the graphical calendar """
|
||||
category_name = _("Report Options")
|
||||
|
||||
@ -561,9 +561,8 @@ class CalendarOptions(MenuReportOptions):
|
||||
"""
|
||||
Update the filter list based on the selected person
|
||||
"""
|
||||
_db = self.__dbstate.get_database()
|
||||
gid = self.__pid.get_value()
|
||||
person = _db.get_person_from_gramps_id(gid)
|
||||
person = self.__db.get_person_from_gramps_id(gid)
|
||||
filter_list = ReportUtils.get_person_filters(person, False)
|
||||
self.__filter.set_filters(filter_list)
|
||||
|
||||
@ -648,14 +647,14 @@ class CalendarReportOptions(CalendarOptions):
|
||||
def __init__(self, name, dbstate=None):
|
||||
CalendarOptions.__init__(self, name, dbstate)
|
||||
|
||||
def add_menu_options(self, menu,dbstate):
|
||||
def add_menu_options(self, menu):
|
||||
""" Adds the options for the graphical calendar """
|
||||
category_name = _("Text Options")
|
||||
titletext = StringOption(_("Title text"),
|
||||
_("Birthday and Anniversary Report"))
|
||||
titletext.set_help(_("Title of calendar"))
|
||||
menu.add_option(category_name,"titletext", titletext)
|
||||
CalendarOptions.add_menu_options(self, menu, dbstate)
|
||||
CalendarOptions.add_menu_options(self, menu)
|
||||
category_name = _("Report Options")
|
||||
option = BooleanOption(_("Include relationships to center person (slower)"),
|
||||
False)
|
||||
|
Reference in New Issue
Block a user