* src/ArgeHandler.py: Support for CODE for CLI mode.
* src/Plugins.py: Use 'text' instead of 'doc'. * src/Report.py: Support for CODE reports. * src/ReportOptions.py: Paper-setting methods for runtime. * src/const.py.in: Label change. * src/plugins/GraphViz.py: Convert to new scheme. svn: r3867
This commit is contained in:
parent
40559041d3
commit
c0f3a10147
@ -1,3 +1,11 @@
|
||||
2005-01-04 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/ArgeHandler.py: Support for CODE for CLI mode.
|
||||
* src/Plugins.py: Use 'text' instead of 'doc'.
|
||||
* src/Report.py: Support for CODE reports.
|
||||
* src/ReportOptions.py: Paper-setting methods for runtime.
|
||||
* src/const.py.in: Label change.
|
||||
* src/plugins/GraphViz.py: Convert to new scheme.
|
||||
|
||||
2005-01-04 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/Plugins.py: move non-gui functions to PluginMgr.py
|
||||
* src/PluginMgr.py: Non-gui functions for plugins
|
||||
|
@ -48,7 +48,7 @@ import DbPrompter
|
||||
import QuestionDialog
|
||||
import GrampsGconfKeys
|
||||
import RecentFiles
|
||||
import Plugins
|
||||
import PluginMgr
|
||||
import Report
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -530,12 +530,12 @@ class ArgHandler:
|
||||
os._exit(1)
|
||||
|
||||
found = False
|
||||
for item in Plugins._cl:
|
||||
for item in PluginMgr.cl_list:
|
||||
if name == item[0]:
|
||||
category = item[1]
|
||||
report_class = item[2]
|
||||
options_class = item[3]
|
||||
if category == const.CATEGORY_BOOK:
|
||||
if category in (const.CATEGORY_BOOK,const.CATEGORY_CODE):
|
||||
options_class(self.parent.db,name,category,options_str_dict)
|
||||
else:
|
||||
Report.cl_report(self.parent.db,name,category,
|
||||
|
@ -500,8 +500,7 @@ def build_tools_menu(top_menu,callback):
|
||||
# get_text_doc_menu
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class GrampsDocFormatComboBox(gtk.ComboBox):
|
||||
class GrampsTextFormatComboBox(gtk.ComboBox):
|
||||
|
||||
def set(self,tables,callback,obj=None,active=None):
|
||||
self.store = gtk.ListStore(str)
|
||||
|
@ -40,7 +40,6 @@ from types import ClassType, InstanceType
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gnome
|
||||
import gnome.ui
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -942,7 +941,7 @@ class ReportDialog(BareReportDialog):
|
||||
def get_default_basename(self):
|
||||
"""What should the default name be?
|
||||
"""
|
||||
spath = self.get_stylesheet_savefile()
|
||||
spath = self.options.handler.get_stylesheet_savefile()
|
||||
return spath.split('.')[0]
|
||||
|
||||
def get_print_pagecount_map(self):
|
||||
@ -1320,6 +1319,7 @@ class ReportDialog(BareReportDialog):
|
||||
(self.paper,paper_name) = self.papersize_menu.get_value()
|
||||
|
||||
self.options.handler.set_paper_name(paper_name)
|
||||
self.options.handler.set_paper(self.paper)
|
||||
|
||||
if self.paper.get_height() <= 0 or self.paper.get_width() <= 0:
|
||||
try:
|
||||
@ -1429,7 +1429,7 @@ class TextReportDialog(ReportDialog):
|
||||
"""Build a menu of document types that are appropriate for
|
||||
this text report. This menu will be generated based upon
|
||||
whether the document requires table support, etc."""
|
||||
self.format_menu = Plugins.GrampsDocFormatComboBox()
|
||||
self.format_menu = Plugins.GrampsTextFormatComboBox()
|
||||
self.format_menu.set(self.doc_uses_tables(),
|
||||
self.doc_type_changed, None, active)
|
||||
|
||||
@ -1652,6 +1652,7 @@ class CommandLineReport:
|
||||
for paper in PaperMenu.paper_sizes:
|
||||
if paper.get_name() == self.options_dict['papers']:
|
||||
self.paper = paper
|
||||
self.option_class.handler.set_paper(self.paper)
|
||||
self.options_help['papers'].append(
|
||||
[ paper.get_name() for paper in PaperMenu.paper_sizes
|
||||
if paper.get_name() != 'Custom Size' ] )
|
||||
@ -1726,7 +1727,8 @@ def report(database,person,report_class,options_class,translated_name,name,categ
|
||||
dialog_class = TextReportDialog
|
||||
elif category == const.CATEGORY_DRAW:
|
||||
dialog_class = DrawReportDialog
|
||||
elif category in (const.CATEGORY_BOOK,const.CATEGORY_VIEW):
|
||||
elif category in (const.CATEGORY_BOOK,const.CATEGORY_VIEW,
|
||||
const.CATEGORY_CODE):
|
||||
report_class(database,person)
|
||||
return
|
||||
else:
|
||||
|
@ -598,6 +598,18 @@ class OptionHandler:
|
||||
def set_paper_name(self,paper_name):
|
||||
self.paper_name = paper_name
|
||||
|
||||
def get_paper(self):
|
||||
"""
|
||||
This method is for temporary storage, not for saving/restoring.
|
||||
"""
|
||||
return self.paper
|
||||
|
||||
def set_paper(self,paper):
|
||||
"""
|
||||
This method is for temporary storage, not for saving/restoring.
|
||||
"""
|
||||
self.paper = paper
|
||||
|
||||
def get_template_name(self):
|
||||
return self.template_name
|
||||
|
||||
|
@ -892,10 +892,10 @@ CATEGORY_BOOK = 5
|
||||
standalone_categories = {
|
||||
CATEGORY_TEXT : _("Text Reports"),
|
||||
CATEGORY_DRAW : _("Graphical Reports"),
|
||||
CATEGORY_CODE : _("Code-generating Reports"),
|
||||
CATEGORY_CODE : _("Code Generators"),
|
||||
CATEGORY_WEB : _("Web Page"),
|
||||
CATEGORY_VIEW : _("View"),
|
||||
CATEGORY_BOOK : _("Book Reports"),
|
||||
CATEGORY_BOOK : _("Books"),
|
||||
}
|
||||
|
||||
book_categories = {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user