diff --git a/gramps2/src/ArgHandler.py b/gramps2/src/ArgHandler.py index 28428b33a..3be99cbeb 100644 --- a/gramps2/src/ArgHandler.py +++ b/gramps2/src/ArgHandler.py @@ -55,7 +55,8 @@ import Config import RecentFiles import Utils -from PluginUtils import Report, Tool, cl_list, cli_tool_list +from PluginUtils import Tool, cl_list, cli_tool_list +from ReportBase import CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB, cl_report #------------------------------------------------------------------------- # ArgHandler @@ -644,14 +645,13 @@ class ArgHandler: category = item[1] report_class = item[2] options_class = item[3] - if category in (Report.CATEGORY_BOOK,Report.CATEGORY_CODE, - Report.CATEGORY_WEB): + if category in (CATEGORY_BOOK,CATEGORY_CODE,CATEGORY_WEB): options_class(self.state.db,name, category,options_str_dict) else: - Report.cl_report(self.state.db,name,category, - report_class,options_class, - options_str_dict) + cl_report(self.state.db,name,category, + report_class,options_class, + options_str_dict) return print "Unknown report name. Available names are:" diff --git a/gramps2/src/DataViews/_PedigreeView.py b/gramps2/src/DataViews/_PedigreeView.py index a8e5dfc31..c6352d354 100644 --- a/gramps2/src/DataViews/_PedigreeView.py +++ b/gramps2/src/DataViews/_PedigreeView.py @@ -56,7 +56,7 @@ import Utils import DateHandler import ImgManip import Errors -from PluginUtils.Report import ReportUtils +from ReportBase import ReportUtils from Editors import EditPerson from DdTargets import DdTargets import cPickle as pickle diff --git a/gramps2/src/DataViews/_RelationView.py b/gramps2/src/DataViews/_RelationView.py index bb9717f3a..1fb73f358 100644 --- a/gramps2/src/DataViews/_RelationView.py +++ b/gramps2/src/DataViews/_RelationView.py @@ -28,7 +28,7 @@ import GrampsWidgets import Errors import GrampsDb -from PluginUtils.Report import ReportUtils +from ReportBase import ReportUtils _GenderCode = { RelLib.Person.MALE : u'\u2642', diff --git a/gramps2/src/Editors/_EditFamily.py b/gramps2/src/Editors/_EditFamily.py index 2b96a21fa..2d20bad32 100644 --- a/gramps2/src/Editors/_EditFamily.py +++ b/gramps2/src/Editors/_EditFamily.py @@ -71,7 +71,7 @@ import Config import Errors from _EditPrimary import EditPrimary -from PluginUtils.Report import ReportUtils +from ReportBase import ReportUtils from DdTargets import DdTargets from DisplayTabs import \ EmbeddedList,EventEmbedList,SourceEmbedList,FamilyAttrEmbedList,\ diff --git a/gramps2/src/ReportBase/_CommandLineReport.py b/gramps2/src/ReportBase/_CommandLineReport.py index 079c32743..c184a91dd 100644 --- a/gramps2/src/ReportBase/_CommandLineReport.py +++ b/gramps2/src/ReportBase/_CommandLineReport.py @@ -27,7 +27,7 @@ import PluginUtils import NameDisplay import Utils import BaseDoc -from Report import CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK +from _Constants import CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK from _PaperMenu import paper_sizes #------------------------------------------------------------------------ diff --git a/gramps2/src/ReportBase/__init__.py b/gramps2/src/ReportBase/__init__.py index 648570324..a0332042a 100644 --- a/gramps2/src/ReportBase/__init__.py +++ b/gramps2/src/ReportBase/__init__.py @@ -31,6 +31,7 @@ from _TemplateParser import _template_map from _Report import Report from _ReportDialog import report +from _CommandLineReport import cl_report from _DrawReportDialog import DrawReportDialog from _TextReportDialog import TextReportDialog diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 7de4f9123..b74f11791 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -59,9 +59,10 @@ import gobject # GRAMPS modules # #------------------------------------------------------------------------- -from PluginUtils import Plugins, Report, Tool, PluginStatus, \ +from PluginUtils import Plugins, Tool, PluginStatus, \ relationship_class, load_plugins, \ tool_list, report_list +from ReportBase import standalone_categories, report import DisplayState import const import Config @@ -897,7 +898,7 @@ class ViewManager: self.reportactions = gtk.ActionGroup('ReportWindow') (ui, actions) = self.build_plugin_menu('ReportsMenu', report_list, - Report.standalone_categories, + standalone_categories, make_report_callback) self.reportactions.add_actions(actions) self.uistate.uimanager.add_ui_from_string(ui) @@ -965,11 +966,10 @@ def by_menu_name(a, b): def make_report_callback(lst, dbstate, uistate): - return lambda x: Report.report(dbstate.db, dbstate.get_active_person(), + return lambda x: report(dbstate.db, dbstate.get_active_person(), lst[0], lst[1], lst[2], lst[3], lst[4]) def make_tool_callback(lst, dbstate, uistate): return lambda x: Tool.gui_tool(dbstate, uistate, lst[0], lst[1], lst[2], lst[3], lst[4], dbstate.db.request_rebuild) -