* src/plugins/vaious: upgrade to new report interface
svn: r6838
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user