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