diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 1bc176f36..df1c7e2e0 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2005-09-26 Alex Roitman + * all reports: switch categories from const to Report module. + 2005-09-26 Don Allingham * src/docgen/PSDrawDoc.py: locale independent floating point * src/DateDisplay.py: Better french republican date handling diff --git a/gramps2/src/ArgHandler.py b/gramps2/src/ArgHandler.py index 03b7b68b0..74fdeb152 100644 --- a/gramps2/src/ArgHandler.py +++ b/gramps2/src/ArgHandler.py @@ -608,8 +608,8 @@ class ArgHandler: category = item[1] report_class = item[2] options_class = item[3] - if category in (const.CATEGORY_BOOK,const.CATEGORY_CODE, - const.CATEGORY_WEB): + if category in (Report.CATEGORY_BOOK,Report.CATEGORY_CODE, + Report.CATEGORY_WEB): options_class(self.parent.db,name, category,options_str_dict) else: diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 20c61e8dc..e1362a17e 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -87,6 +87,28 @@ MODE_GUI = 1 # Standalone report using GUI MODE_BKI = 2 # Book Item interface using GUI MODE_CLI = 4 # Command line interface (CLI) +# Report categories +CATEGORY_TEXT = 0 +CATEGORY_DRAW = 1 +CATEGORY_CODE = 2 +CATEGORY_WEB = 3 +CATEGORY_VIEW = 4 +CATEGORY_BOOK = 5 + +standalone_categories = { + CATEGORY_TEXT : _("Text Reports"), + CATEGORY_DRAW : _("Graphical Reports"), + CATEGORY_CODE : _("Code Generators"), + CATEGORY_WEB : _("Web Page"), + CATEGORY_VIEW : _("View"), + CATEGORY_BOOK : _("Books"), +} + +book_categories = { + CATEGORY_TEXT : _("Text"), + CATEGORY_DRAW : _("Graphics"), +} + #------------------------------------------------------------------------- # # Support for printing generated files @@ -1465,7 +1487,7 @@ class TextReportDialog(ReportDialog): """Initialize a dialog to request that the user select options for a basic text report. See the ReportDialog class for more information.""" - self.category = const.CATEGORY_TEXT + self.category = CATEGORY_TEXT ReportDialog.__init__(self,database,person,options,name,translated_name) #------------------------------------------------------------------------ @@ -1503,7 +1525,7 @@ class DrawReportDialog(ReportDialog): """Initialize a dialog to request that the user select options for a basic drawing report. See the ReportDialog class for more information.""" - self.category = const.CATEGORY_DRAW + self.category = CATEGORY_DRAW ReportDialog.__init__(self,database,person,opt,name,translated_name) #------------------------------------------------------------------------ @@ -1677,7 +1699,7 @@ class CommandLineReport: self.option_class.handler.output = self.options_dict['of'] self.options_help['of'].append(os.path.expanduser("~/whatever_name")) - if self.category == const.CATEGORY_TEXT: + if self.category == CATEGORY_TEXT: for item in PluginMgr.textdoc_list: if item[7] == self.options_dict['off']: self.format = item[1] @@ -1685,7 +1707,7 @@ class CommandLineReport: [ item[7] for item in PluginMgr.textdoc_list ] ) self.options_help['off'].append(False) - elif self.category == const.CATEGORY_DRAW: + elif self.category == CATEGORY_DRAW: for item in PluginMgr.drawdoc_list: if item[6] == self.options_dict['off']: self.format = item[1] @@ -1693,7 +1715,7 @@ class CommandLineReport: [ item[6] for item in PluginMgr.drawdoc_list ] ) self.options_help['off'].append(False) - elif self.category == const.CATEGORY_BOOK: + elif self.category == CATEGORY_BOOK: for item in PluginMgr.bookdoc_list: if item[6] == self.options_dict['off']: self.format = item[1] @@ -1722,7 +1744,7 @@ class CommandLineReport: self.template_name = self.options_dict['template'] self.options_help['template'].append(os.path.expanduser("~/whatever_name")) - if self.category in (const.CATEGORY_TEXT,const.CATEGORY_DRAW): + if self.category in (CATEGORY_TEXT,CATEGORY_DRAW): default_style = BaseDoc.StyleSheet() self.option_class.make_default_style(default_style) @@ -1778,12 +1800,12 @@ def report(database,person,report_class,options_class,translated_name,name,categ its arguments. """ - if category == const.CATEGORY_TEXT: + if category == CATEGORY_TEXT: dialog_class = TextReportDialog - elif category == const.CATEGORY_DRAW: + elif category == CATEGORY_DRAW: dialog_class = DrawReportDialog - elif category in (const.CATEGORY_BOOK,const.CATEGORY_VIEW, - const.CATEGORY_CODE,const.CATEGORY_WEB): + elif category in (CATEGORY_BOOK,CATEGORY_VIEW, + CATEGORY_CODE,CATEGORY_WEB): report_class(database,person) return else: diff --git a/gramps2/src/const.py.in b/gramps2/src/const.py.in index 274429167..d42232bf0 100644 --- a/gramps2/src/const.py.in +++ b/gramps2/src/const.py.in @@ -930,28 +930,6 @@ notes_formats = [ _("Preformatted"), ] - -CATEGORY_TEXT = 0 -CATEGORY_DRAW = 1 -CATEGORY_CODE = 2 -CATEGORY_WEB = 3 -CATEGORY_VIEW = 4 -CATEGORY_BOOK = 5 - -standalone_categories = { - CATEGORY_TEXT : _("Text Reports"), - CATEGORY_DRAW : _("Graphical Reports"), - CATEGORY_CODE : _("Code Generators"), - CATEGORY_WEB : _("Web Page"), - CATEGORY_VIEW : _("View"), - CATEGORY_BOOK : _("Books"), -} - -book_categories = { - CATEGORY_TEXT : _("Text"), - CATEGORY_DRAW : _("Graphics"), -} - TOOL_DEBUG = -1 TOOL_ANAL = 0 TOOL_DBPROC = 1 diff --git a/gramps2/src/plugins/AncestorChart.py b/gramps2/src/plugins/AncestorChart.py index 7258b5cda..296cecbb1 100644 --- a/gramps2/src/plugins/AncestorChart.py +++ b/gramps2/src/plugins/AncestorChart.py @@ -45,7 +45,6 @@ import BaseDoc import Report from SubstKeywords import SubstKeywords from ReportUtils import pt2cm -import const import ReportOptions #------------------------------------------------------------------------ @@ -265,7 +264,7 @@ class AncestorChartOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'ancestor_chart', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = AncestorChart, options_class = AncestorChartOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/AncestorChart2.py b/gramps2/src/plugins/AncestorChart2.py index cbfed2a0e..d42b8b1c8 100644 --- a/gramps2/src/plugins/AncestorChart2.py +++ b/gramps2/src/plugins/AncestorChart2.py @@ -46,7 +46,6 @@ import BaseDoc import Report from SubstKeywords import SubstKeywords from ReportUtils import pt2cm, cm2pt -import const import ReportOptions #------------------------------------------------------------------------ @@ -516,7 +515,7 @@ class AncestorChartOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'ancestor_chart2', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = AncestorChart, options_class = AncestorChartOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/AncestorReport.py b/gramps2/src/plugins/AncestorReport.py index 168d5d933..2191bc9fe 100644 --- a/gramps2/src/plugins/AncestorReport.py +++ b/gramps2/src/plugins/AncestorReport.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,6 @@ # #------------------------------------------------------------------------ import os -import string from gettext import gettext as _ #------------------------------------------------------------------------ @@ -43,7 +42,6 @@ import Errors from DateHandler import displayer as _dd from QuestionDialog import ErrorDialog import ReportOptions -import const #------------------------------------------------------------------------ # @@ -160,7 +158,7 @@ class AncestorReport(Report.Report): buried = None for event_handle in person.get_event_list(): event = self.database.get_event_from_handle(event_handle) - if string.lower(event.get_name()) == "burial": + if event.get_name().lower() == "burial": buried = event death_handle = person.get_death_handle() @@ -298,7 +296,7 @@ class AncestorOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'ancestor_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = AncestorReport, options_class = AncestorOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/Ancestors.py b/gramps2/src/plugins/Ancestors.py index 45bb41a81..e036d7b41 100644 --- a/gramps2/src/plugins/Ancestors.py +++ b/gramps2/src/plugins/Ancestors.py @@ -961,7 +961,7 @@ class ComprehensiveAncestorsOptions(ReportOptions.ReportOptions): #------------------------------------------------------------------------ PluginMgr.register_report( name = 'ancestors_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = ComprehensiveAncestorsReport, options_class = ComprehensiveAncestorsOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/BookReport.py b/gramps2/src/plugins/BookReport.py index 4681e844a..eee30c3ec 100644 --- a/gramps2/src/plugins/BookReport.py +++ b/gramps2/src/plugins/BookReport.py @@ -56,7 +56,6 @@ import gtk.glade #------------------------------------------------------------------------- from RelLib import Person -import const import Utils import ListModel import PluginMgr @@ -1109,7 +1108,7 @@ def cl_report(database,name,category,options_str_dict): #------------------------------------------------------------------------ PluginMgr.register_report( name = 'book', - category = const.CATEGORY_BOOK, + category = Report.CATEGORY_BOOK, report_class = BookReportSelector, options_class = cl_report, modes = Report.MODE_GUI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/CountAncestors.py b/gramps2/src/plugins/CountAncestors.py index aeb69f1b9..3982f326a 100644 --- a/gramps2/src/plugins/CountAncestors.py +++ b/gramps2/src/plugins/CountAncestors.py @@ -45,7 +45,6 @@ import gtk.glade # #------------------------------------------------------------------------ import Utils -import const import Report #------------------------------------------------------------------------ @@ -114,7 +113,7 @@ class CountAncestors: from PluginMgr import register_report register_report( name = 'count_ancestors', - category = const.CATEGORY_VIEW, + category = Report.CATEGORY_VIEW, report_class = CountAncestors, options_class = None, modes = Report.MODE_GUI, diff --git a/gramps2/src/plugins/CustomBookText.py b/gramps2/src/plugins/CustomBookText.py index 8e0ef30fa..bc74f384f 100644 --- a/gramps2/src/plugins/CustomBookText.py +++ b/gramps2/src/plugins/CustomBookText.py @@ -43,7 +43,6 @@ import gtk #------------------------------------------------------------------------ import Report import BaseDoc -import const import ReportOptions #------------------------------------------------------------------------ @@ -213,7 +212,7 @@ class CustomTextOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'custom_text', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = CustomText, options_class = CustomTextOptions, modes = Report.MODE_BKI, diff --git a/gramps2/src/plugins/DescendChart.py b/gramps2/src/plugins/DescendChart.py index 5e3342efc..7585f22ed 100644 --- a/gramps2/src/plugins/DescendChart.py +++ b/gramps2/src/plugins/DescendChart.py @@ -46,7 +46,6 @@ import BaseDoc import Report from SubstKeywords import SubstKeywords from ReportUtils import pt2cm, cm2pt -import const import ReportOptions import NameDisplay @@ -467,7 +466,7 @@ class DescendChartOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'descend_chart2', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = DescendChart, options_class = DescendChartOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/DescendReport.py b/gramps2/src/plugins/DescendReport.py index ea58abbb2..dfc7fec1f 100644 --- a/gramps2/src/plugins/DescendReport.py +++ b/gramps2/src/plugins/DescendReport.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,7 +42,6 @@ import Sort from QuestionDialog import ErrorDialog import ReportOptions import ReportUtils -import const import NameDisplay #------------------------------------------------------------------------ @@ -247,7 +246,7 @@ class DescendantOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'descend_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = DescendantReport, options_class = DescendantOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index 88648dc1c..fb807aaae 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -816,7 +816,7 @@ class DetAncestorOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'det_ancestor_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = DetAncestorReport, options_class = DetAncestorOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index c03b85c33..91e27696f 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -842,7 +842,7 @@ class DetDescendantOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'det_descendant_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = DetDescendantReport, options_class = DetDescendantOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/FamilyGroup.py b/gramps2/src/plugins/FamilyGroup.py index ff8010442..1e59ccb36 100644 --- a/gramps2/src/plugins/FamilyGroup.py +++ b/gramps2/src/plugins/FamilyGroup.py @@ -45,7 +45,6 @@ import RelLib import Report import BaseDoc import ReportOptions -import const from DateHandler import displayer as _dd #------------------------------------------------------------------------ @@ -541,7 +540,7 @@ class FamilyGroupOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'family_group', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = FamilyGroup, options_class = FamilyGroupOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/FanChart.py b/gramps2/src/plugins/FanChart.py index e58b96341..a9af07aa5 100644 --- a/gramps2/src/plugins/FanChart.py +++ b/gramps2/src/plugins/FanChart.py @@ -42,7 +42,6 @@ import gtk import BaseDoc import Report import ReportOptions -import const from SubstKeywords import SubstKeywords from ReportUtils import pt2cm @@ -317,7 +316,7 @@ class FanChartOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'fan_chart', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = FanChart, options_class = FanChartOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/FtmStyleAncestors.py b/gramps2/src/plugins/FtmStyleAncestors.py index 430058328..e6abba0f4 100644 --- a/gramps2/src/plugins/FtmStyleAncestors.py +++ b/gramps2/src/plugins/FtmStyleAncestors.py @@ -39,7 +39,6 @@ import BaseDoc import RelLib import ReportOptions from DateHandler import displayer as dd -import const import ReportUtils #------------------------------------------------------------------------ @@ -416,7 +415,7 @@ from PluginMgr import register_report register_report( name = 'ftm_ancestor_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = FtmAncestorReport, options_class = FtmAncestorOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/FtmStyleDescendants.py b/gramps2/src/plugins/FtmStyleDescendants.py index 88b9af578..81f16b693 100644 --- a/gramps2/src/plugins/FtmStyleDescendants.py +++ b/gramps2/src/plugins/FtmStyleDescendants.py @@ -43,7 +43,6 @@ import RelLib import ReportUtils import ReportOptions from DateHandler import displayer as dd -import const #------------------------------------------------------------------------ # @@ -564,7 +563,7 @@ class FtmDescendantOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'ftm_descendant_report', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = FtmDescendantReport, options_class = FtmDescendantOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/GraphViz.py b/gramps2/src/plugins/GraphViz.py index 5dd3703a5..e4a895845 100644 --- a/gramps2/src/plugins/GraphViz.py +++ b/gramps2/src/plugins/GraphViz.py @@ -47,7 +47,6 @@ import gtk import Report import ReportOptions import GenericFilter -import const import RelLib from BaseDoc import PAPER_LANDSCAPE from latin_utf8 import utf8_to_latin @@ -754,7 +753,7 @@ class GraphVizDialog(Report.ReportDialog): name = "rel_graph" translated_name = _("Relationship Graph") self.options_class = GraphVizOptions(name) - self.category = const.CATEGORY_CODE + self.category = Report.CATEGORY_CODE Report.ReportDialog.__init__(self,database,person,self.options_class, name,translated_name) @@ -960,7 +959,7 @@ def get_description_graphics(): from PluginMgr import register_report register_report( name = 'rel_graph', - category = const.CATEGORY_CODE, + category = Report.CATEGORY_CODE, report_class = GraphVizDialog, options_class = cl_report, modes = Report.MODE_GUI | Report.MODE_CLI, @@ -974,7 +973,7 @@ register_report( if dot_found: register_report( name = 'rel_graph2', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = GraphVizGraphics, options_class = GraphVizOptions, modes = Report.MODE_GUI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/IndivComplete.py b/gramps2/src/plugins/IndivComplete.py index 4b8028fe2..d17d56d54 100644 --- a/gramps2/src/plugins/IndivComplete.py +++ b/gramps2/src/plugins/IndivComplete.py @@ -587,7 +587,7 @@ from PluginMgr import register_report register_report( name = 'indiv_complete', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = IndivCompleteReport, options_class = IndivCompleteOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/IndivSummary.py b/gramps2/src/plugins/IndivSummary.py index f722569ac..50ae39356 100644 --- a/gramps2/src/plugins/IndivSummary.py +++ b/gramps2/src/plugins/IndivSummary.py @@ -47,7 +47,6 @@ import const import BaseDoc import Report import ReportOptions -import const #------------------------------------------------------------------------ # @@ -383,7 +382,7 @@ from PluginMgr import register_report register_report( name = 'individual_summary', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = IndivSummary, options_class = IndivSummaryOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/NavWebPage.py b/gramps2/src/plugins/NavWebPage.py index 38633fac4..3ce248d51 100644 --- a/gramps2/src/plugins/NavWebPage.py +++ b/gramps2/src/plugins/NavWebPage.py @@ -2376,7 +2376,7 @@ class WebReportDialog(Report.ReportDialog): name = "navwebpage" translated_name = _("Generate Web Site") self.options = WebReportOptions(name,database) - self.category = const.CATEGORY_WEB + self.category = Report.CATEGORY_WEB Report.ReportDialog.__init__(self,database,person,self.options, name,translated_name) self.style_name = None @@ -2620,7 +2620,7 @@ def sort_nameof(person, private): from PluginMgr import register_report register_report( name = 'navwebpage', - category = const.CATEGORY_WEB, + category = Report.CATEGORY_WEB, report_class = WebReportDialog, options_class = cl_report, modes = Report.MODE_GUI, diff --git a/gramps2/src/plugins/SimpleBookTitle.py b/gramps2/src/plugins/SimpleBookTitle.py index abe9612bd..d8326fc68 100644 --- a/gramps2/src/plugins/SimpleBookTitle.py +++ b/gramps2/src/plugins/SimpleBookTitle.py @@ -45,7 +45,6 @@ import Report import BaseDoc import SelectObject import AddMedia -import const import ReportOptions import ImgManip @@ -295,7 +294,7 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions): from PluginMgr import register_report register_report( name = 'simple_book_title', - category = const.CATEGORY_TEXT, + category = Report.CATEGORY_TEXT, report_class = SimpleBookTitle, options_class = SimpleBookTitleOptions, modes = Report.MODE_BKI, diff --git a/gramps2/src/plugins/StatisticsChart.py b/gramps2/src/plugins/StatisticsChart.py index bdb63792f..f71c14e0d 100755 --- a/gramps2/src/plugins/StatisticsChart.py +++ b/gramps2/src/plugins/StatisticsChart.py @@ -52,7 +52,6 @@ import gtk # Person and relation types from RelLib import Person, Family # gender and report type names -import const import BaseDoc import Report import ReportUtils @@ -974,7 +973,7 @@ from PluginMgr import register_report register_report( name = 'statistics_chart', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = StatisticsChart, options_class = StatisticsChartOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/Summary.py b/gramps2/src/plugins/Summary.py index ff1502e92..f0dfbea01 100644 --- a/gramps2/src/plugins/Summary.py +++ b/gramps2/src/plugins/Summary.py @@ -45,7 +45,6 @@ import gtk.glade #------------------------------------------------------------------------ import Utils import RelLib -import const import Report #------------------------------------------------------------------------ @@ -170,7 +169,7 @@ from PluginMgr import register_report register_report( name = 'summary', - category = const.CATEGORY_VIEW, + category = Report.CATEGORY_VIEW, report_class = SummaryReport, options_class = None, modes = Report.MODE_GUI, diff --git a/gramps2/src/plugins/TimeLine.py b/gramps2/src/plugins/TimeLine.py index d5c562660..e4696c5c4 100644 --- a/gramps2/src/plugins/TimeLine.py +++ b/gramps2/src/plugins/TimeLine.py @@ -51,7 +51,6 @@ import GenericFilter import Sort import ReportOptions from QuestionDialog import ErrorDialog -import const #------------------------------------------------------------------------ # @@ -472,7 +471,7 @@ from PluginMgr import register_report register_report( name = 'timeline', - category = const.CATEGORY_DRAW, + category = Report.CATEGORY_DRAW, report_class = TimeLine, options_class = TimeLineOptions, modes = Report.MODE_GUI | Report.MODE_BKI | Report.MODE_CLI, diff --git a/gramps2/src/plugins/WebPage.py b/gramps2/src/plugins/WebPage.py index 8b698dd04..2d4098c45 100644 --- a/gramps2/src/plugins/WebPage.py +++ b/gramps2/src/plugins/WebPage.py @@ -1770,7 +1770,7 @@ class WebReportDialog(Report.ReportDialog): name = "webpage" translated_name = _("Generate Web Site") self.options_class = WebReportOptions(name) - self.category = const.CATEGORY_WEB + self.category = Report.CATEGORY_WEB Report.ReportDialog.__init__(self,database,person,self.options_class, name,translated_name) @@ -1968,7 +1968,7 @@ def cl_report(database,name,category,options_str_dict): from PluginMgr import register_report register_report( name = 'webpage', - category = const.CATEGORY_WEB, + category = Report.CATEGORY_WEB, report_class = WebReportDialog, options_class = cl_report, modes = Report.MODE_GUI | Report.MODE_CLI,