* src/plugins/vaious: upgrade to new report interface

svn: r6838
This commit is contained in:
Brian Matherly
2006-06-01 04:39:40 +00:00
parent bf7247c5e4
commit f99fbb9fda
25 changed files with 220 additions and 167 deletions

View File

@ -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."),