svn: r6823
This commit is contained in:
Alex Roitman 2006-05-31 02:03:29 +00:00
parent 1acfca142b
commit f055426222
7 changed files with 15 additions and 14 deletions

View File

@ -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:"

View File

@ -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

View File

@ -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',

View File

@ -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,\

View File

@ -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
#------------------------------------------------------------------------

View File

@ -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

View File

@ -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)