diff --git a/ChangeLog b/ChangeLog index 24592d1d7..35faf713e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-05-31 Brian Matherly + * src/plugins/vaious: upgrade to new report interface + 2006-05-31 Don Allingham * src/DataViews/_PersonView.py: call FilterEditor * src/FilterEditor/__init__.py: added diff --git a/src/plugins/AncestorChart.py b/src/plugins/AncestorChart.py index c8698fb58..48d82ba56 100644 --- a/src/plugins/AncestorChart.py +++ b/src/plugins/AncestorChart.py @@ -42,7 +42,10 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI + from SubstKeywords import SubstKeywords pt2cm = ReportUtils.pt2cm @@ -59,7 +62,7 @@ _DIED = _('d.') # AncestorChart # #------------------------------------------------------------------------ -class AncestorChart(Report.Report): +class AncestorChart(Report): def __init__(self,database,person,options_class): """ @@ -78,7 +81,7 @@ class AncestorChart(Report.Report): pagebbg - Whether to include page breaks between generations. dispf - Display format for the output box. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) (self.max_generations,self.pgbrk) \ = options_class.get_report_generations() @@ -216,14 +219,14 @@ class AncestorChart(Report.Report): # # #------------------------------------------------------------------------ -class AncestorChartOptions(ReportOptions.ReportOptions): +class AncestorChartOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def enable_options(self): # Semi-common options that should be enabled for this report @@ -262,10 +265,10 @@ class AncestorChartOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'ancestor_chart', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = AncestorChart, options_class = AncestorChartOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Ancestor Chart"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/AncestorChart2.py b/src/plugins/AncestorChart2.py index 3e27e214f..e5a73de84 100644 --- a/src/plugins/AncestorChart2.py +++ b/src/plugins/AncestorChart2.py @@ -44,7 +44,9 @@ import gtk #------------------------------------------------------------------------ import BaseDoc from SubstKeywords import SubstKeywords -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI pt2cm = ReportUtils.pt2cm cm2pt = ReportUtils.cm2pt @@ -161,7 +163,7 @@ class GenChart: # AncestorChart # #------------------------------------------------------------------------ -class AncestorChart(Report.Report): +class AncestorChart(Report): def __init__(self,database,person,options_class): """ @@ -183,7 +185,7 @@ class AncestorChart(Report.Report): compress - Whether to compress chart. title - Title of the report displayed on top. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) (self.max_generations,self.pgbrk) \ = options_class.get_report_generations() @@ -417,14 +419,14 @@ class AncestorChart(Report.Report): # # #------------------------------------------------------------------------ -class AncestorChartOptions(ReportOptions.ReportOptions): +class AncestorChartOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -513,10 +515,10 @@ class AncestorChartOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'ancestor_chart2', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = AncestorChart, options_class = AncestorChartOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Ancestor Graph"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index 4bdf21b8d..bf70ca378 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -42,8 +42,10 @@ import gtk # #------------------------------------------------------------------------ import const -from PluginUtils import Report, ReportOptions, ReportUtils, \ - register_report, relationship_class +from PluginUtils import register_report , relationship_class +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI + import BaseDoc import RelLib from DateHandler import displayer as _dd @@ -54,7 +56,7 @@ from NameDisplay import displayer as _nd # ComprehensiveAncestorsReport # #------------------------------------------------------------------------ -class ComprehensiveAncestorsReport (Report.Report): +class ComprehensiveAncestorsReport (Report): def __init__(self,database,person,options_class): """ @@ -74,7 +76,7 @@ class ComprehensiveAncestorsReport (Report.Report): cites - Whether or not to include source informaiton. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.map = {} @@ -854,14 +856,14 @@ class ComprehensiveAncestorsReport (Report.Report): # # #------------------------------------------------------------------------ -class ComprehensiveAncestorsOptions(ReportOptions.ReportOptions): +class ComprehensiveAncestorsOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -959,10 +961,10 @@ class ComprehensiveAncestorsOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'ancestors_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = ComprehensiveAncestorsReport, options_class = ComprehensiveAncestorsOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Comprehensive Ancestors Report"), status = _("Beta"), description= _("Produces a detailed ancestral report."), diff --git a/src/plugins/Calendar.py b/src/plugins/Calendar.py index 2695d1e63..e8c4120af 100644 --- a/src/plugins/Calendar.py +++ b/src/plugins/Calendar.py @@ -37,7 +37,9 @@ import locale # #------------------------------------------------------------------------ import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI pt2cm = ReportUtils.pt2cm from Filters import CustomFilters, GenericFilter, ParamFilter, Rules import GrampsLocale @@ -88,7 +90,7 @@ def easter(year): # Calendar # #------------------------------------------------------------------------ -class Calendar(Report.Report): +class Calendar(Report): """ Creates the Calendar object that produces the report. """ @@ -551,7 +553,7 @@ class FilterWidget(Widget): # it would be ok to put there, because self.widgets would be empty. # ----------------------------------------------------------------- -class NewReportOptions(ReportOptions.ReportOptions): +class NewReportOptions(ReportOptions): """ Defines options and provides code to handling the interface. This is free of any graphics specifics. @@ -910,10 +912,10 @@ class Holidays: #------------------------------------------------------------------------ register_report( name = 'calendar', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = Calendar, options_class = CalendarOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Calendar"), status = _("Experimental"), author_name = "Douglas S. Blank", diff --git a/src/plugins/CmdRef.py b/src/plugins/CmdRef.py index afcf7f9b8..b0bc509a3 100644 --- a/src/plugins/CmdRef.py +++ b/src/plugins/CmdRef.py @@ -37,7 +37,8 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from PluginUtils import Tool, Report, cl_list, cli_tool_list, register_tool +from PluginUtils import Tool, cl_list, cli_tool_list, register_tool +from ReportBase import Report, CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB import Utils #------------------------------------------------------------------------- @@ -102,9 +103,9 @@ class CmdRef(Tool.Tool): for item in cl_list: category = item[1] - if category in (Report.CATEGORY_BOOK, - Report.CATEGORY_CODE, - Report.CATEGORY_WEB): + if category in (CATEGORY_BOOK, + CATEGORY_CODE, + CATEGORY_WEB): self.write_ref(f,item,level+2,id_counter,category) else: self.write_ref(f,item,level+2,id_counter,None) @@ -157,13 +158,13 @@ class CmdRef(Tool.Tool): # Instantiate options class if category == None: oclass = item[3]( item[0]) - elif category == Report.CATEGORY_BOOK: + elif category == CATEGORY_BOOK: import BookReport oclass = BookReport.BookOptions(item[0]) - elif category == Report.CATEGORY_CODE: + elif category == CATEGORY_CODE: import GraphViz oclass = GraphViz.GraphVizOptions(item[0]) - elif category == Report.CATEGORY_WEB: + elif category == CATEGORY_WEB: if item[0] == "webpage": import WebPage oclass = WebPage.WebReportOptions(item[0]) diff --git a/src/plugins/CountAncestors.py b/src/plugins/CountAncestors.py index ab2eb1989..ee41a30f2 100644 --- a/src/plugins/CountAncestors.py +++ b/src/plugins/CountAncestors.py @@ -46,7 +46,8 @@ import gtk.glade # #------------------------------------------------------------------------ import Utils -from PluginUtils import Report, register_report +from PluginUtils import register_report +from ReportBase import Report, CATEGORY_VIEW, MODE_GUI from ManagedWindow import set_titles #------------------------------------------------------------------------ @@ -126,10 +127,10 @@ class CountAncestors: #------------------------------------------------------------------------- register_report( name = 'count_ancestors', - category = Report.CATEGORY_VIEW, + category = CATEGORY_VIEW, report_class = CountAncestors, options_class = None, - modes = Report.MODE_GUI, + modes = MODE_GUI, translated_name = _("Number of ancestors"), status = _("Beta"), description= _("Counts number of ancestors of selected person") diff --git a/src/plugins/CustomBookText.py b/src/plugins/CustomBookText.py index fd2ce03ca..6d34860b5 100644 --- a/src/plugins/CustomBookText.py +++ b/src/plugins/CustomBookText.py @@ -41,7 +41,8 @@ import gtk # gramps modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportOptions, CATEGORY_TEXT, MODE_BKI import BaseDoc #------------------------------------------------------------------------ @@ -49,7 +50,7 @@ import BaseDoc # CustomText # #------------------------------------------------------------------------ -class CustomText(Report.Report): +class CustomText(Report): def __init__(self,database,person,options_class): """ @@ -68,7 +69,7 @@ class CustomText(Report.Report): mid - Text in the middle. bot - Text on the bottom. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.top_text = options_class.handler.options_dict['top'] self.middle_text = options_class.handler.options_dict['mid'] @@ -92,14 +93,14 @@ class CustomText(Report.Report): # # #------------------------------------------------------------------------ -class CustomTextOptions(ReportOptions.ReportOptions): +class CustomTextOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -210,9 +211,9 @@ class CustomTextOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'custom_text', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = CustomText, options_class = CustomTextOptions, - modes = Report.MODE_BKI, + modes = MODE_BKI, translated_name = _("Custom Text"), ) diff --git a/src/plugins/DesGraph.py b/src/plugins/DesGraph.py index 554d1b09a..6020d254b 100644 --- a/src/plugins/DesGraph.py +++ b/src/plugins/DesGraph.py @@ -41,7 +41,10 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI + pt2cm = ReportUtils.pt2cm import BaseDoc from SubstKeywords import SubstKeywords @@ -127,7 +130,7 @@ class DescendLine(GraphLayout): # DescendantGraph # #------------------------------------------------------------------------ -class DescendantGraph(Report.Report): +class DescendantGraph(Report): def __init__(self,database,person,options_class): """ @@ -144,7 +147,7 @@ class DescendantGraph(Report.Report): dispf - Display format for the output box. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.display = options_class.handler.options_dict['dispf'] @@ -359,14 +362,14 @@ class DescendantGraph(Report.Report): # # #------------------------------------------------------------------------ -class DescendantGraphOptions(ReportOptions.ReportOptions): +class DescendantGraphOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def enable_options(self): # Semi-common options that should be enabled for this report @@ -403,10 +406,10 @@ class DescendantGraphOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'descendant_graph', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = DescendantGraph, options_class = DescendantGraphOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Descendant Graph"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/DescendChart.py b/src/plugins/DescendChart.py index e3c9a9d8d..ce152bccf 100644 --- a/src/plugins/DescendChart.py +++ b/src/plugins/DescendChart.py @@ -43,7 +43,9 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportOptions, ReportUtils, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI pt2cm = ReportUtils.pt2cm cm2pt = ReportUtils.cm2pt from SubstKeywords import SubstKeywords @@ -103,7 +105,7 @@ class GenChart: # DescendChart # #------------------------------------------------------------------------ -class DescendChart(Report.Report): +class DescendChart(Report): def __init__(self,database,person,options_class): """ @@ -123,7 +125,7 @@ class DescendChart(Report.Report): title - Title of the report displayed on top. maxgen - Maximum number of generations to include. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) (self.max_generations,self.pgbrk) \ = options_class.get_report_generations() @@ -372,14 +374,14 @@ class DescendChart(Report.Report): # # #------------------------------------------------------------------------ -class DescendChartOptions(ReportOptions.ReportOptions): +class DescendChartOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -465,10 +467,10 @@ class DescendChartOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'descend_chart2', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = DescendChart, options_class = DescendChartOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Descendant Chart"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index e44918857..a22270888 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -35,7 +35,9 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import BaseDoc import Errors import Sort @@ -58,7 +60,7 @@ _DIED = _('d.') # DescendantReport # #------------------------------------------------------------------------ -class DescendantReport(Report.Report): +class DescendantReport(Report): def __init__(self,database,person,options_class): """ @@ -78,7 +80,7 @@ class DescendantReport(Report.Report): """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) (self.max_generations,self.pgbrk) \ = options_class.get_report_generations() @@ -186,14 +188,14 @@ class DescendantReport(Report.Report): # # #------------------------------------------------------------------------ -class DescendantOptions(ReportOptions.ReportOptions): +class DescendantOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def enable_options(self): # Semi-common options that should be enabled for this report @@ -247,10 +249,10 @@ class DescendantOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'descend_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = DescendantReport, options_class = DescendantOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Descendant Report"), status=(_("Stable")), description=_("Generates a list of descendants of the active person"), diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 556f1df19..7a475a5cd 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -44,7 +44,10 @@ import gtk # #------------------------------------------------------------------------ import RelLib -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI + import BaseDoc import Utils import DateHandler @@ -63,7 +66,7 @@ EMPTY_ENTRY = "_____________" # # #------------------------------------------------------------------------ -class DetAncestorReport(Report.Report): +class DetAncestorReport(Report): def __init__(self,database,person,options_class): """ @@ -91,7 +94,7 @@ class DetAncestorReport(Report.Report): childRef - Whether to add descendant references in child list. addImages - Whether to include images. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.map = {} @@ -579,14 +582,14 @@ class DetAncestorReport(Report.Report): # # #------------------------------------------------------------------------ -class DetAncestorOptions(ReportOptions.ReportOptions): +class DetAncestorOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -858,10 +861,10 @@ class DetAncestorOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'det_ancestor_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = DetAncestorReport, options_class = DetAncestorOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Detailed Ancestral Report"), status=(_("Beta")), description= _("Produces a detailed ancestral report"), diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 8d4c35482..0b631c539 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -46,7 +46,9 @@ import gtk import RelLib import Utils import Errors -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import BaseDoc import const import DateHandler @@ -66,7 +68,7 @@ HENRY = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" # # #------------------------------------------------------------------------ -class DetDescendantReport(Report.Report): +class DetDescendantReport(Report): def __init__(self,database,person,options_class): """ @@ -95,7 +97,7 @@ class DetDescendantReport(Report.Report): childRef - Whether to add descendant references in child list. addImages - Whether to include images. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.map = {} @@ -611,14 +613,14 @@ class DetDescendantReport(Report.Report): # # #------------------------------------------------------------------------ -class DetDescendantOptions(ReportOptions.ReportOptions): +class DetDescendantOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -898,10 +900,10 @@ class DetDescendantOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'det_descendant_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = DetDescendantReport, options_class = DetDescendantOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Detailed Descendant Report"), status=(_("Beta")), description= _("Produces a detailed descendant report"), diff --git a/src/plugins/FamilyGroup.py b/src/plugins/FamilyGroup.py index 2cb018184..1db61e2c9 100644 --- a/src/plugins/FamilyGroup.py +++ b/src/plugins/FamilyGroup.py @@ -35,7 +35,9 @@ import gtk # #------------------------------------------------------------------------ import RelLib -from PluginUtils import Report, ReportOptions, register_report, ReportUtils +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import BaseDoc import DateHandler import Utils @@ -46,7 +48,7 @@ from TransUtils import sgettext as _ # FamilyGroup # #------------------------------------------------------------------------ -class FamilyGroup(Report.Report): +class FamilyGroup(Report): def __init__(self,database,person,options_class): """ @@ -63,7 +65,7 @@ class FamilyGroup(Report.Report): family_handle - Handle of the family to write report on. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.family_handle = None @@ -662,14 +664,14 @@ class FamilyGroup(Report.Report): # # #------------------------------------------------------------------------ -class FamilyGroupOptions(ReportOptions.ReportOptions): +class FamilyGroupOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -901,10 +903,10 @@ class FamilyGroupOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'family_group', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = FamilyGroup, options_class = FamilyGroupOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Family Group Report"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/FanChart.py b/src/plugins/FanChart.py index 84ae36a0e..625c2fe19 100644 --- a/src/plugins/FanChart.py +++ b/src/plugins/FanChart.py @@ -40,7 +40,9 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI from SubstKeywords import SubstKeywords pt2cm = ReportUtils.pt2cm @@ -49,7 +51,7 @@ pt2cm = ReportUtils.pt2cm # FanChart # #------------------------------------------------------------------------ -class FanChart(Report.Report): +class FanChart(Report): def __init__(self,database,person,options_class): """ @@ -66,7 +68,7 @@ class FanChart(Report.Report): display - """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.height = 0 self.lines = 0 @@ -278,14 +280,14 @@ class FanChart(Report.Report): # # #------------------------------------------------------------------------ -class FanChartOptions(ReportOptions.ReportOptions): +class FanChartOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def make_default_style(self,default_style): @@ -316,10 +318,10 @@ class FanChartOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'fan_chart', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = FanChart, options_class = FanChartOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Fan Chart"), status = _("Stable"), author_name = "Donald N. Allingham", diff --git a/src/plugins/FtmStyleAncestors.py b/src/plugins/FtmStyleAncestors.py index 8eab05678..97bde975a 100644 --- a/src/plugins/FtmStyleAncestors.py +++ b/src/plugins/FtmStyleAncestors.py @@ -38,14 +38,16 @@ import BaseDoc import RelLib import DateHandler import const -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI #------------------------------------------------------------------------ # # AncestorReport # #------------------------------------------------------------------------ -class FtmAncestorReport(Report.Report): +class FtmAncestorReport(Report): def __init__(self,database,person,options_class): """ @@ -63,7 +65,7 @@ class FtmAncestorReport(Report.Report): gen - Maximum number of generations to include. pagebgg - Whether to include page breaks between generations. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.map = {} @@ -349,14 +351,14 @@ class FtmAncestorReport(Report.Report): # # #------------------------------------------------------------------------ -class FtmAncestorOptions(ReportOptions.ReportOptions): +class FtmAncestorOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def enable_options(self): # Semi-common options that should be enabled for this report @@ -414,10 +416,10 @@ class FtmAncestorOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'ftm_ancestor_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = FtmAncestorReport, options_class = FtmAncestorOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("FTM Style Ancestor Report"), status=(_("Beta")), description= _("Produces a textual ancestral report similar to Family Tree Maker."), diff --git a/src/plugins/FtmStyleDescendants.py b/src/plugins/FtmStyleDescendants.py index 9b37e4b91..b1e0a627f 100644 --- a/src/plugins/FtmStyleDescendants.py +++ b/src/plugins/FtmStyleDescendants.py @@ -37,7 +37,9 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import BaseDoc import RelLib import DateHandler @@ -48,7 +50,7 @@ import const # DescendantReport # #------------------------------------------------------------------------ -class FtmDescendantReport(Report.Report): +class FtmDescendantReport(Report): def __init__(self,database,person,options_class): """ @@ -67,7 +69,7 @@ class FtmDescendantReport(Report.Report): pagebbg - Whether to include page breaks between generations. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.anc_map = {} self.gen_map = {} @@ -492,14 +494,14 @@ class FtmDescendantReport(Report.Report): # # #------------------------------------------------------------------------ -class FtmDescendantOptions(ReportOptions.ReportOptions): +class FtmDescendantOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def enable_options(self): # Semi-common options that should be enabled for this report @@ -562,10 +564,10 @@ class FtmDescendantOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'ftm_descendant_report', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = FtmDescendantReport, options_class = FtmDescendantOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("FTM Style Descendant Report"), status = _("Beta"), description= _("Produces a textual descendant report similar to Family Tree Maker."), diff --git a/src/plugins/GraphViz.py b/src/plugins/GraphViz.py index 3ee7688f7..d4c99e875 100644 --- a/src/plugins/GraphViz.py +++ b/src/plugins/GraphViz.py @@ -52,7 +52,11 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_CODE, CATEGORY_DRAW, MODE_GUI, MODE_CLI +from ReportBase._ReportDialog import ReportDialog +from ReportBase._CommandLineReport import CommandLineReport from Filters import GenericFilter, CustomFilters, Rules import RelLib import DateHandler @@ -545,14 +549,14 @@ just use iconv: # Options class # #------------------------------------------------------------------------ -class GraphVizOptions(ReportOptions.ReportOptions): +class GraphVizOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -922,7 +926,7 @@ class GraphVizOptions(ReportOptions.ReportOptions): # Dialog class # #------------------------------------------------------------------------ -class GraphVizDialog(Report.ReportDialog): +class GraphVizDialog(ReportDialog): def __init__(self,database,person): self.database = database @@ -930,8 +934,8 @@ class GraphVizDialog(Report.ReportDialog): name = "rel_graph" translated_name = _("Relationship Graph") self.options_class = GraphVizOptions(name) - self.category = Report.CATEGORY_CODE - Report.ReportDialog.__init__(self,database,person,self.options_class, + self.category = CATEGORY_CODE + ReportDialog.__init__(self,database,person,self.options_class, name,translated_name) response = self.window.run() if response == gtk.RESPONSE_OK: @@ -1102,7 +1106,7 @@ class EmptyDoc: #------------------------------------------------------------------------ def cl_report(database,name,category,options_str_dict): - clr = Report.CommandLineReport(database,name,category,GraphVizOptions, + clr = CommandLineReport(database,name,category,GraphVizOptions, options_str_dict) # Exit here if show option was given @@ -1116,7 +1120,7 @@ def cl_report(database,name,category,options_str_dict): # # #------------------------------------------------------------------------ -class GraphVizGraphics(Report.Report): +class GraphVizGraphics(Report): def __init__(self,database,person,options_class): self.database = database self.start_person = person @@ -1202,10 +1206,10 @@ def get_description_graphics(): #------------------------------------------------------------------------ register_report( name = 'rel_graph', - category = Report.CATEGORY_CODE, + category = CATEGORY_CODE, report_class = GraphVizDialog, options_class = cl_report, - modes = Report.MODE_GUI | Report.MODE_CLI, + modes = MODE_GUI | MODE_CLI, translated_name = _("Relationship Graph"), status = _("Stable"), description= get_description(), @@ -1216,10 +1220,10 @@ register_report( if _dot_found: register_report( name = 'rel_graph2', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = GraphVizGraphics, options_class = GraphVizOptions, - modes = Report.MODE_GUI | Report.MODE_CLI, + modes = MODE_GUI | MODE_CLI, translated_name = _("Relationship Graph"), status = _("Stable"), description= get_description_graphics(), diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index e1004290d..ff03ad28f 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -46,14 +46,16 @@ import Utils import BaseDoc from Filters import GenericFilter, Rules, CustomFilters import DateHandler -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI #------------------------------------------------------------------------ # # IndivComplete # #------------------------------------------------------------------------ -class IndivCompleteReport(Report.Report): +class IndivCompleteReport(Report): def __init__(self,database,person,options_class): """ @@ -74,7 +76,7 @@ class IndivCompleteReport(Report.Report): cites - Whether or not to include source informaiton. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.use_srcs = options_class.handler.options_dict['cites'] @@ -509,14 +511,14 @@ class IndivCompleteReport(Report.Report): # # #------------------------------------------------------------------------ -class IndivCompleteOptions(ReportOptions.ReportOptions): +class IndivCompleteOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -635,10 +637,10 @@ class IndivCompleteOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'indiv_complete', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = IndivCompleteReport, options_class = IndivCompleteOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Complete Individual Report"), status=(_("Stable")), author_name="Donald N. Allingham", diff --git a/src/plugins/IndivSummary.py b/src/plugins/IndivSummary.py index 12d44fd93..5a7fe2c22 100644 --- a/src/plugins/IndivSummary.py +++ b/src/plugins/IndivSummary.py @@ -45,7 +45,9 @@ import gtk import RelLib import const import BaseDoc -from PluginUtils import Report, ReportOptions, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import DateHandler #------------------------------------------------------------------------ @@ -53,7 +55,7 @@ import DateHandler # IndivSummary # #------------------------------------------------------------------------ -class IndivSummary(Report.Report): +class IndivSummary(Report): def __init__(self,database,person,options_class): """ @@ -67,7 +69,7 @@ class IndivSummary(Report.Report): """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) def define_table_styles(self): tbl = BaseDoc.TableStyle() @@ -326,14 +328,14 @@ class IndivSummary(Report.Report): # # #------------------------------------------------------------------------ -class IndivSummaryOptions(ReportOptions.ReportOptions): +class IndivSummaryOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def make_default_style(self,default_style): """Make the default output style for the Individual Summary Report.""" @@ -380,10 +382,10 @@ class IndivSummaryOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'individual_summary', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = IndivSummary, options_class = IndivSummaryOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Individual Summary"), status=(_("Stable")), description=_("Produces a detailed report on the selected person."), diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index 7f326bf26..af0822e81 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -69,7 +69,11 @@ import const from GrampsCfg import get_researcher from Filters import GenericFilter, Rules, CustomFilters import Sort -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_WEB, MODE_GUI, MODE_CLI +from ReportBase._ReportDialog import ReportDialog +from ReportBase._CommandLineReport import CommandLineReport import Errors import Utils import ImgManip @@ -1957,7 +1961,7 @@ class IndividualPage(BasePage): # WebReport # #------------------------------------------------------------------------ -class WebReport(Report.Report): +class WebReport(Report): def __init__(self,database,person,options): """ Creates WebReport object that produces the report. @@ -2296,14 +2300,14 @@ class WebReport(Report.Report): # # #------------------------------------------------------------------------ -class WebReportOptions(ReportOptions.ReportOptions): +class WebReportOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,database=None,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) self.db = database def set_new_options(self): @@ -2585,7 +2589,7 @@ class WebReportOptions(ReportOptions.ReportOptions): # # #------------------------------------------------------------------------ -class WebReportDialog(Report.ReportDialog): +class WebReportDialog(ReportDialog): def __init__(self,database,person): self.database = database @@ -2593,8 +2597,8 @@ class WebReportDialog(Report.ReportDialog): name = "navwebpage" translated_name = _("Generate Web Site") self.options = WebReportOptions(name,database) - self.category = Report.CATEGORY_WEB - Report.ReportDialog.__init__(self,database,person,self.options, + self.category = CATEGORY_WEB + ReportDialog.__init__(self,database,person,self.options, name,translated_name) self.style_name = None @@ -2742,7 +2746,7 @@ def sort_people(db,handle_list): #------------------------------------------------------------------------ def cl_report(database,name,category,options_str_dict): - clr = Report.CommandLineReport(database,name,category,WebReportOptions, + clr = CommandLineReport(database,name,category,WebReportOptions, options_str_dict) # Exit here if show option was given @@ -2841,10 +2845,10 @@ def sort_nameof(person, private): #------------------------------------------------------------------------- register_report( name = 'navwebpage', - category = Report.CATEGORY_WEB, + category = CATEGORY_WEB, report_class = WebReportDialog, options_class = cl_report, - modes = Report.MODE_GUI | Report.MODE_CLI, + modes = MODE_GUI | MODE_CLI, translated_name = _("Narrative Web Site"), status = _("Stable"), author_name="Donald N. Allingham", diff --git a/src/plugins/SimpleBookTitle.py b/src/plugins/SimpleBookTitle.py index ad20f897b..6d83c062c 100644 --- a/src/plugins/SimpleBookTitle.py +++ b/src/plugins/SimpleBookTitle.py @@ -40,7 +40,8 @@ import gtk # gramps modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportOptions, CATEGORY_TEXT, MODE_BKI import BaseDoc from Selectors import selector_factory SelectObject = selector_factory('MediaObject') @@ -52,7 +53,7 @@ import ImgManip # SimpleBookTitle # #------------------------------------------------------------------------ -class SimpleBookTitle(Report.Report): +class SimpleBookTitle(Report): def __init__(self,database,person,options_class): """ @@ -74,7 +75,7 @@ class SimpleBookTitle(Report.Report): footer - Footer string. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) self.title_string = options_class.handler.options_dict['title'] self.image_size = options_class.handler.options_dict['imgsize'] @@ -112,14 +113,14 @@ class SimpleBookTitle(Report.Report): # # #------------------------------------------------------------------------ -class SimpleBookTitleOptions(ReportOptions.ReportOptions): +class SimpleBookTitleOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -292,9 +293,9 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'simple_book_title', - category = Report.CATEGORY_TEXT, + category = CATEGORY_TEXT, report_class = SimpleBookTitle, options_class = SimpleBookTitleOptions, - modes = Report.MODE_BKI, + modes = MODE_BKI, translated_name = _("Title Page"), ) diff --git a/src/plugins/StatisticsChart.py b/src/plugins/StatisticsChart.py index 93d3da19d..6d88e36d3 100644 --- a/src/plugins/StatisticsChart.py +++ b/src/plugins/StatisticsChart.py @@ -53,7 +53,9 @@ import gtk from RelLib import Person, FamilyRelType, EventType # gender and report type names import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI from Filters import GenericFilter, Rules, CustomFilters import DateHandler from Utils import ProgressMeter @@ -468,7 +470,7 @@ _Extract = Extract() # Statistics report # #------------------------------------------------------------------------ -class StatisticsChart(Report.Report): +class StatisticsChart(Report): def __init__(self, database, person, options_class): """ @@ -483,7 +485,7 @@ class StatisticsChart(Report.Report): To see what the options are, check the options help in the options class. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) @@ -756,12 +758,12 @@ class StatisticsChart(Report.Report): # Statistics report options # #------------------------------------------------------------------------ -class StatisticsChartOptions(ReportOptions.ReportOptions): +class StatisticsChartOptions(ReportOptions): """ Defines options and provides their handling interface. """ def __init__(self,name, person_id=None): - ReportOptions.ReportOptions.__init__(self, name, person_id) + ReportOptions.__init__(self, name, person_id) def set_new_options(self): # Options specific for this report @@ -971,10 +973,10 @@ class StatisticsChartOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'statistics_chart', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = StatisticsChart, options_class = StatisticsChartOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Statistics Chart"), status = (_("Stable")), author_name="Eero Tamminen", diff --git a/src/plugins/Summary.py b/src/plugins/Summary.py index bb0276305..78b64e666 100644 --- a/src/plugins/Summary.py +++ b/src/plugins/Summary.py @@ -45,7 +45,8 @@ import gtk.glade #------------------------------------------------------------------------ import Utils import RelLib -from PluginUtils import Report, register_report +from PluginUtils import register_report +from ReportBase import Report, CATEGORY_VIEW, MODE_GUI import DateHandler from ManagedWindow import set_titles @@ -169,10 +170,10 @@ class SummaryReport: #------------------------------------------------------------------------- register_report( name = 'summary', - category = Report.CATEGORY_VIEW, + category = CATEGORY_VIEW, report_class = SummaryReport, options_class = None, - modes = Report.MODE_GUI, + modes = MODE_GUI, translated_name = _("Summary of the database"), status = _("Beta"), description= _("Provides a summary of the current database"), diff --git a/src/plugins/TimeLine.py b/src/plugins/TimeLine.py index 17ab937d7..2786e0972 100644 --- a/src/plugins/TimeLine.py +++ b/src/plugins/TimeLine.py @@ -43,7 +43,9 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -from PluginUtils import Report, ReportOptions, ReportUtils, register_report +from PluginUtils import register_report +from ReportBase import Report, ReportUtils, ReportOptions, \ + CATEGORY_DRAW, MODE_GUI, MODE_BKI, MODE_CLI pt2cm = ReportUtils.pt2cm import BaseDoc from Filters import GenericFilter, Rules, CustomFilters @@ -55,7 +57,7 @@ from QuestionDialog import ErrorDialog # TimeLine # #------------------------------------------------------------------------ -class TimeLine(Report.Report): +class TimeLine(Report): def __init__(self,database,person,options_class): """ @@ -80,7 +82,7 @@ class TimeLine(Report.Report): returning the list of sort functions. """ - Report.Report.__init__(self,database,person,options_class) + Report.__init__(self,database,person,options_class) filter_num = options_class.get_filter_number() filters = options_class.get_report_filters(person) @@ -347,14 +349,14 @@ class TimeLine(Report.Report): # # #------------------------------------------------------------------------ -class TimeLineOptions(ReportOptions.ReportOptions): +class TimeLineOptions(ReportOptions): """ Defines options and provides handling interface. """ def __init__(self,name,person_id=None): - ReportOptions.ReportOptions.__init__(self,name,person_id) + ReportOptions.__init__(self,name,person_id) def set_new_options(self): # Options specific for this report @@ -476,10 +478,10 @@ class TimeLineOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ register_report( name = 'timeline', - category = Report.CATEGORY_DRAW, + category = CATEGORY_DRAW, report_class = TimeLine, options_class = TimeLineOptions, - modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, + modes = MODE_GUI | MODE_BKI | MODE_CLI, translated_name = _("Timeline Graph"), status = _("Stable"), author_name = "Donald N. Allingham",