* src/Report.py: Clean up the split into BareReportDialog and
ReportDialog classes. * src/Plugins.py: Enable book item registration. * src/plugins/BookReport.py: lots of changes -- trying to get it work. * src/plugins/FtmStyleDescendants.py: book item functionality. svn: r1671
This commit is contained in:
parent
36a694f411
commit
b19034763d
@ -1,3 +1,10 @@
|
|||||||
|
2003-06-07 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/Report.py: Clean up the split into BareReportDialog and
|
||||||
|
ReportDialog classes.
|
||||||
|
* src/Plugins.py: Enable book item registration.
|
||||||
|
* src/plugins/BookReport.py: lots of changes -- trying to get it work.
|
||||||
|
* src/plugins/FtmStyleDescendants.py: book item functionality.
|
||||||
|
|
||||||
2003-06-07 Don Allingham <dallingham@users.sourceforge.net>
|
2003-06-07 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
|
||||||
* src/EditPerson.py: Allow a default gender to be specified if a new
|
* src/EditPerson.py: Allow a default gender to be specified if a new
|
||||||
|
@ -78,6 +78,7 @@ _loaddir = []
|
|||||||
_textdoc = []
|
_textdoc = []
|
||||||
_drawdoc = []
|
_drawdoc = []
|
||||||
_failmsg = []
|
_failmsg = []
|
||||||
|
_bkitems = []
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -514,6 +515,20 @@ def relationship_function():
|
|||||||
global _relcalc_task
|
global _relcalc_task
|
||||||
return _relcalc_task
|
return _relcalc_task
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Book item registration
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def register_book_item(name,category,options_dialog,write_book_item,get_options,get_style):
|
||||||
|
"""Register a book item"""
|
||||||
|
|
||||||
|
for n in _bkitems:
|
||||||
|
if n[0] == name:
|
||||||
|
return
|
||||||
|
_bkitems.append((name,category,options_dialog,write_book_item,get_options,get_style))
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Image attributes
|
# Image attributes
|
||||||
|
@ -227,6 +227,7 @@ class BareReportDialog:
|
|||||||
self.setup_html_frame()
|
self.setup_html_frame()
|
||||||
self.setup_report_options_frame()
|
self.setup_report_options_frame()
|
||||||
self.setup_other_frames()
|
self.setup_other_frames()
|
||||||
|
self.setup_center_person()
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -259,6 +260,14 @@ class BareReportDialog:
|
|||||||
Report for %s'."""
|
Report for %s'."""
|
||||||
return(name)
|
return(name)
|
||||||
|
|
||||||
|
def get_stylesheet_savefile(self):
|
||||||
|
"""Where should new styles for this report be saved? This is
|
||||||
|
the name of an XML file that will be located in the ~/.gramps
|
||||||
|
directory. This file does not have to exist; it will be
|
||||||
|
created when needed. All subclasses should probably override
|
||||||
|
this function."""
|
||||||
|
return "basic_report.xml"
|
||||||
|
|
||||||
def get_report_filters(self):
|
def get_report_filters(self):
|
||||||
"""Return the data used to fill out the 'filter' combo box in
|
"""Return the data used to fill out the 'filter' combo box in
|
||||||
the report options box. The return value is the list of
|
the report options box. The return value is the list of
|
||||||
@ -334,6 +343,34 @@ class BareReportDialog:
|
|||||||
if tooltip:
|
if tooltip:
|
||||||
self.add_tooltip(widget,tooltip)
|
self.add_tooltip(widget,tooltip)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Functions to create a default output style.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
def make_default_style(self):
|
||||||
|
"""Create the default style to be used by the associated report. This
|
||||||
|
routine is a default implementation and should be overridden."""
|
||||||
|
font = TextDoc.FontStyle()
|
||||||
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set_font(font)
|
||||||
|
para.set_header_level(1)
|
||||||
|
para.set(pad=0.5)
|
||||||
|
self.default_style.add_style("Title",para)
|
||||||
|
|
||||||
|
def build_style_menu(self):
|
||||||
|
"""Build a menu of style sets that are available for use in
|
||||||
|
this report. This menu will always have a default style
|
||||||
|
available, and will have any other style set name that the
|
||||||
|
user has previously created for this report. This menu is
|
||||||
|
created here instead of inline with the rest of the style
|
||||||
|
frame, because it must be recreated to reflect any changes
|
||||||
|
whenever the user closes the style editor dialog."""
|
||||||
|
style_sheet_map = self.style_sheet_list.get_style_sheet_map()
|
||||||
|
myMenu = Utils.build_string_optmenu(style_sheet_map, "default")
|
||||||
|
self.style_menu.set_menu(myMenu)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Functions related to setting up the dialog window.
|
# Functions related to setting up the dialog window.
|
||||||
@ -508,11 +545,70 @@ class BareReportDialog:
|
|||||||
table.attach(widget,2,3,row,row+1)
|
table.attach(widget,2,3,row,row+1)
|
||||||
row = row + 1
|
row = row + 1
|
||||||
|
|
||||||
|
def setup_style_frame(self):
|
||||||
|
"""Set up the style frame of the dialog. This function relies
|
||||||
|
on other routines create the default style for this report,
|
||||||
|
and to read in any user defined styles for this report. It
|
||||||
|
the builds a menu of all the available styles for the user to
|
||||||
|
choose from."""
|
||||||
|
|
||||||
|
# Styles Frame
|
||||||
|
label = gtk.Label("%s:" % _("Styles"))
|
||||||
|
label.set_alignment(0.0,0.5)
|
||||||
|
|
||||||
|
self.style_menu = gtk.OptionMenu()
|
||||||
|
self.style_button = gtk.Button("%s..." % _("Style Editor"))
|
||||||
|
self.style_button.connect('clicked',self.on_style_edit_clicked)
|
||||||
|
|
||||||
|
self.tbl.attach(label,1,2,self.col,self.col+1,gtk.SHRINK|gtk.FILL)
|
||||||
|
self.tbl.attach(self.style_menu,2,3,self.col,self.col+1)
|
||||||
|
self.tbl.attach(self.style_button,3,4,self.col,self.col+1,gtk.SHRINK|gtk.FILL)
|
||||||
|
self.col += 1
|
||||||
|
|
||||||
|
# Build the default style set for this report.
|
||||||
|
self.default_style = TextDoc.StyleSheet()
|
||||||
|
self.make_default_style()
|
||||||
|
|
||||||
|
# Build the initial list of available styles sets. This
|
||||||
|
# includes the default style set and any style sets saved from
|
||||||
|
# previous invocations of gramps.
|
||||||
|
self.style_sheet_list = TextDoc.StyleSheetList(self.get_stylesheet_savefile(),
|
||||||
|
self.default_style)
|
||||||
|
|
||||||
|
# Now build the actual menu.
|
||||||
|
self.build_style_menu()
|
||||||
|
|
||||||
|
def setup_center_person(self):
|
||||||
|
center_label = gtk.Label("<b>%s</b>" % _("Center Person"))
|
||||||
|
center_label.set_use_markup(gtk.TRUE)
|
||||||
|
center_label.set_alignment(0.0,0.5)
|
||||||
|
self.tbl.set_border_width(12)
|
||||||
|
self.tbl.attach(center_label,0,4,1,2,gtk.SHRINK|gtk.FILL)
|
||||||
|
|
||||||
|
name = self.person.getPrimaryName().getRegularName()
|
||||||
|
self.person_label = gtk.Label( "<i>%s</i>" % name )
|
||||||
|
self.person_label.set_use_markup(gtk.TRUE)
|
||||||
|
self.person_label.set_alignment(0.0,0.5)
|
||||||
|
self.tbl.attach(self.person_label,2,3,2,3)
|
||||||
|
|
||||||
|
change_button = gtk.Button("%s..." % _('_Change') )
|
||||||
|
change_button.connect('clicked',self.on_center_person_change_clicked)
|
||||||
|
self.tbl.attach(change_button,3,4,2,3,gtk.SHRINK|gtk.SHRINK)
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Functions related to retrieving data from the dialog window
|
# Functions related to retrieving data from the dialog window
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
def parse_style_frame(self):
|
||||||
|
"""Parse the style frame of the dialog. Save the user
|
||||||
|
selected output style for later use. Note that this routine
|
||||||
|
retrieves a value whether or not the menu is displayed on the
|
||||||
|
screen. The subclass will know whether this menu was enabled.
|
||||||
|
This is for simplicity of programming."""
|
||||||
|
self.selected_style = self.style_menu.get_menu().get_active().get_data("d")
|
||||||
|
|
||||||
def parse_report_options_frame(self):
|
def parse_report_options_frame(self):
|
||||||
"""Parse the report options frame of the dialog. Save the
|
"""Parse the report options frame of the dialog. Save the
|
||||||
user selected choices for later use. Note that this routine
|
user selected choices for later use. Note that this routine
|
||||||
@ -563,34 +659,35 @@ class BareReportDialog:
|
|||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
||||||
def on_ok_clicked(self, obj):
|
def on_ok_clicked(self, obj):
|
||||||
"""The user is satisfied with the dialog choices. Validate
|
"""The user is satisfied with the dialog choices. Parse all options
|
||||||
the output file name before doing anything else. If there is
|
and close the window."""
|
||||||
a file name, gather the options and create the report."""
|
|
||||||
|
|
||||||
# Is there a filename? This should also test file permissions, etc.
|
|
||||||
if not self.parse_target_frame():
|
|
||||||
return
|
|
||||||
|
|
||||||
# Preparation
|
# Preparation
|
||||||
self.parse_format_frame()
|
|
||||||
self.parse_style_frame()
|
self.parse_style_frame()
|
||||||
self.parse_paper_frame()
|
|
||||||
self.parse_html_frame()
|
|
||||||
self.parse_report_options_frame()
|
self.parse_report_options_frame()
|
||||||
self.parse_other_frames()
|
self.parse_other_frames()
|
||||||
|
|
||||||
# Create the output document.
|
|
||||||
self.make_document()
|
|
||||||
|
|
||||||
# Create the report object and product the report.
|
|
||||||
try:
|
|
||||||
self.make_report()
|
|
||||||
except (IOError,OSError),msg:
|
|
||||||
ErrorDialog(str(msg))
|
|
||||||
|
|
||||||
# Clean up the dialog object
|
# Clean up the dialog object
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
||||||
|
def on_style_edit_clicked(self, obj):
|
||||||
|
"""The user has clicked on the 'Edit Styles' button. Create a
|
||||||
|
style sheet editor object and let them play. When they are
|
||||||
|
done, the previous routine will be called to update the dialog
|
||||||
|
menu for selecting a style."""
|
||||||
|
StyleEditor.StyleListDisplay(self.style_sheet_list,self.build_style_menu)
|
||||||
|
|
||||||
|
def on_center_person_change_clicked(self,obj):
|
||||||
|
import SelectPerson
|
||||||
|
sel_person = SelectPerson.SelectPerson(self.db,'Select Person')
|
||||||
|
new_person = sel_person.run()
|
||||||
|
if new_person:
|
||||||
|
self.person = new_person
|
||||||
|
new_name = new_person.getPrimaryName().getRegularName()
|
||||||
|
if new_name:
|
||||||
|
self.person_label.set_text( "<i>%s</i>" % new_name )
|
||||||
|
self.person_label.set_use_markup(gtk.TRUE)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Functions related to creating the actual report document.
|
# Functions related to creating the actual report document.
|
||||||
@ -642,6 +739,7 @@ class ReportDialog(BareReportDialog):
|
|||||||
def setup_post_process(self):
|
def setup_post_process(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def setup_center_person(self): pass
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -662,14 +760,6 @@ class ReportDialog(BareReportDialog):
|
|||||||
may also control checking of the selected filename."""
|
may also control checking of the selected filename."""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_stylesheet_savefile(self):
|
|
||||||
"""Where should new styles for this report be saved? This is
|
|
||||||
the name of an XML file that will be located in the ~/.gramps
|
|
||||||
directory. This file does not have to exist; it will be
|
|
||||||
created when needed. All subclasses should probably override
|
|
||||||
this function."""
|
|
||||||
return "basic_report.xml"
|
|
||||||
|
|
||||||
def get_default_basename(self):
|
def get_default_basename(self):
|
||||||
"""What should the default name be?
|
"""What should the default name be?
|
||||||
"""
|
"""
|
||||||
@ -706,34 +796,6 @@ class ReportDialog(BareReportDialog):
|
|||||||
his/her preferences."""
|
his/her preferences."""
|
||||||
GrampsCfg.report_dir = value
|
GrampsCfg.report_dir = value
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Functions to create a default output style.
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
def make_default_style(self):
|
|
||||||
"""Create the default style to be used by the associated report. This
|
|
||||||
routine is a default implementation and should be overridden."""
|
|
||||||
font = TextDoc.FontStyle()
|
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set_font(font)
|
|
||||||
para.set_header_level(1)
|
|
||||||
para.set(pad=0.5)
|
|
||||||
self.default_style.add_style("Title",para)
|
|
||||||
|
|
||||||
def build_style_menu(self):
|
|
||||||
"""Build a menu of style sets that are available for use in
|
|
||||||
this report. This menu will always have a default style
|
|
||||||
available, and will have any other style set name that the
|
|
||||||
user has previously created for this report. This menu is
|
|
||||||
created here instead of inline with the rest of the style
|
|
||||||
frame, because it must be recreated to reflect any changes
|
|
||||||
whenever the user closes the style editor dialog."""
|
|
||||||
style_sheet_map = self.style_sheet_list.get_style_sheet_map()
|
|
||||||
myMenu = Utils.build_string_optmenu(style_sheet_map, "default")
|
|
||||||
self.style_menu.set_menu(myMenu)
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Functions related to selecting/changing the current file format.
|
# Functions related to selecting/changing the current file format.
|
||||||
@ -854,39 +916,6 @@ class ReportDialog(BareReportDialog):
|
|||||||
self.target_fileentry.set_filename(path)
|
self.target_fileentry.set_filename(path)
|
||||||
|
|
||||||
|
|
||||||
def setup_style_frame(self):
|
|
||||||
"""Set up the style frame of the dialog. This function relies
|
|
||||||
on other routines create the default style for this report,
|
|
||||||
and to read in any user defined styles for this report. It
|
|
||||||
the builds a menu of all the available styles for the user to
|
|
||||||
choose from."""
|
|
||||||
|
|
||||||
# Styles Frame
|
|
||||||
label = gtk.Label("%s:" % _("Styles"))
|
|
||||||
label.set_alignment(0.0,0.5)
|
|
||||||
|
|
||||||
self.style_menu = gtk.OptionMenu()
|
|
||||||
self.style_button = gtk.Button("%s..." % _("Style Editor"))
|
|
||||||
self.style_button.connect('clicked',self.on_style_edit_clicked)
|
|
||||||
|
|
||||||
self.tbl.attach(label,1,2,self.col,self.col+1,gtk.SHRINK|gtk.FILL)
|
|
||||||
self.tbl.attach(self.style_menu,2,3,self.col,self.col+1)
|
|
||||||
self.tbl.attach(self.style_button,3,4,self.col,self.col+1,gtk.SHRINK|gtk.FILL)
|
|
||||||
self.col += 1
|
|
||||||
|
|
||||||
# Build the default style set for this report.
|
|
||||||
self.default_style = TextDoc.StyleSheet()
|
|
||||||
self.make_default_style()
|
|
||||||
|
|
||||||
# Build the initial list of available styles sets. This
|
|
||||||
# includes the default style set and any style sets saved from
|
|
||||||
# previous invocations of gramps.
|
|
||||||
self.style_sheet_list = TextDoc.StyleSheetList(self.get_stylesheet_savefile(),
|
|
||||||
self.default_style)
|
|
||||||
|
|
||||||
# Now build the actual menu.
|
|
||||||
self.build_style_menu()
|
|
||||||
|
|
||||||
def setup_output_notebook(self):
|
def setup_output_notebook(self):
|
||||||
"""Set up the output notebook of the dialog. This sole
|
"""Set up the output notebook of the dialog. This sole
|
||||||
purpose of this function is to grab a pointer for later use in
|
purpose of this function is to grab a pointer for later use in
|
||||||
@ -1077,14 +1106,6 @@ class ReportDialog(BareReportDialog):
|
|||||||
selected output format for later use."""
|
selected output format for later use."""
|
||||||
self.format = self.format_menu.get_menu().get_active().get_data("name")
|
self.format = self.format_menu.get_menu().get_active().get_data("name")
|
||||||
|
|
||||||
def parse_style_frame(self):
|
|
||||||
"""Parse the style frame of the dialog. Save the user
|
|
||||||
selected output style for later use. Note that this routine
|
|
||||||
retrieves a value whether or not the menu is displayed on the
|
|
||||||
screen. The subclass will know whether this menu was enabled.
|
|
||||||
This is for simplicity of programming."""
|
|
||||||
self.selected_style = self.style_menu.get_menu().get_active().get_data("d")
|
|
||||||
|
|
||||||
def parse_paper_frame(self):
|
def parse_paper_frame(self):
|
||||||
"""Parse the paper frame of the dialog. Save the user
|
"""Parse the paper frame of the dialog. Save the user
|
||||||
selected choices for later use. Note that this routine
|
selected choices for later use. Note that this routine
|
||||||
@ -1130,17 +1151,34 @@ class ReportDialog(BareReportDialog):
|
|||||||
self.template_name = None
|
self.template_name = None
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
def on_ok_clicked(self, obj):
|
||||||
#
|
"""The user is satisfied with the dialog choices. Validate
|
||||||
# Callback functions from the dialog
|
the output file name before doing anything else. If there is
|
||||||
#
|
a file name, gather the options and create the report."""
|
||||||
#------------------------------------------------------------------------
|
|
||||||
def on_style_edit_clicked(self, obj):
|
# Is there a filename? This should also test file permissions, etc.
|
||||||
"""The user has clicked on the 'Edit Styles' button. Create a
|
if not self.parse_target_frame():
|
||||||
style sheet editor object and let them play. When they are
|
return
|
||||||
done, the previous routine will be called to update the dialog
|
|
||||||
menu for selecting a style."""
|
# Preparation
|
||||||
StyleEditor.StyleListDisplay(self.style_sheet_list,self.build_style_menu)
|
self.parse_format_frame()
|
||||||
|
self.parse_style_frame()
|
||||||
|
self.parse_paper_frame()
|
||||||
|
self.parse_html_frame()
|
||||||
|
self.parse_report_options_frame()
|
||||||
|
self.parse_other_frames()
|
||||||
|
|
||||||
|
# Create the output document.
|
||||||
|
self.make_document()
|
||||||
|
|
||||||
|
# Create the report object and product the report.
|
||||||
|
try:
|
||||||
|
self.make_report()
|
||||||
|
except (IOError,OSError),msg:
|
||||||
|
ErrorDialog(str(msg))
|
||||||
|
|
||||||
|
# Clean up the dialog object
|
||||||
|
self.window.destroy()
|
||||||
|
|
||||||
|
|
||||||
class TextReportDialog(ReportDialog):
|
class TextReportDialog(ReportDialog):
|
||||||
|
@ -57,7 +57,7 @@ import Report
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# ReportBook
|
# Book creation dialog class
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class BookReportSelector:
|
class BookReportSelector:
|
||||||
@ -103,10 +103,11 @@ class BookReportSelector:
|
|||||||
book_label.set_text("<b>%s</b>" % "Current book")
|
book_label.set_text("<b>%s</b>" % "Current book")
|
||||||
book_label.set_use_markup(gtk.TRUE)
|
book_label.set_use_markup(gtk.TRUE)
|
||||||
|
|
||||||
|
self.item_storage = {}
|
||||||
|
self.max_key = 0
|
||||||
|
|
||||||
av_titles = [(_('Name'),2,150),(_('Type'),1,50), ('',-1,0)]
|
av_titles = [(_('Name'),2,150),(_('Type'),1,50)]
|
||||||
bk_titles = [(_('Item name'),-1,150),(_('Type'),-1,50),
|
bk_titles = [(_('Item name'),-1,150),(_('Type'),1,50),('',-1,0)] #,('',-1,0)
|
||||||
('',-1,0),('',-1,0)]
|
|
||||||
|
|
||||||
self.av_ncols = len(av_titles)
|
self.av_ncols = len(av_titles)
|
||||||
self.bk_ncols = len(bk_titles)
|
self.bk_ncols = len(bk_titles)
|
||||||
@ -121,49 +122,46 @@ class BookReportSelector:
|
|||||||
def draw_avail_list(self):
|
def draw_avail_list(self):
|
||||||
"""Draw the list with the selections available for the book."""
|
"""Draw the list with the selections available for the book."""
|
||||||
|
|
||||||
data = [_('Title Page'),_('Cover'),self.titlepage]
|
if not Plugins._bkitems:
|
||||||
iter = self.av_model.add(data)
|
return
|
||||||
|
|
||||||
data = [_('Table of Contents'),_('TOC'),self.toc]
|
for book_item in Plugins._bkitems:
|
||||||
new_iter = self.av_model.add(data)
|
data = [ book_item[0], book_item[1] ]
|
||||||
|
new_iter = self.av_model.add(data)
|
||||||
reports = Plugins._reports
|
|
||||||
for report in reports:
|
|
||||||
if not self.ignore(report):
|
|
||||||
data = [report[2],string.split(report[1])[0],report[0]]
|
|
||||||
new_iter = self.av_model.add(data)
|
|
||||||
|
|
||||||
self.av_model.connect_model()
|
self.av_model.connect_model()
|
||||||
|
|
||||||
if iter:
|
if new_iter:
|
||||||
self.av_model.selection.select_iter(iter)
|
self.av_model.selection.select_iter(new_iter)
|
||||||
path = self.av_model.model.get_path(iter)
|
path = self.av_model.model.get_path(new_iter)
|
||||||
col = self.avail_tree.get_column(0)
|
col = self.avail_tree.get_column(0)
|
||||||
self.avail_tree.scroll_to_cell(path,col,1,1,0.0)
|
self.avail_tree.scroll_to_cell(path,col,1,1,0.0)
|
||||||
|
|
||||||
def ignore(self,report):
|
|
||||||
"""Returns true if the report is to be ignored for the book."""
|
|
||||||
|
|
||||||
ignore_names = [_('Book Report')]
|
|
||||||
ignore_categories = [_('View'),_('Web Page')]
|
|
||||||
return (report[2] in ignore_names) or (report[1] in ignore_categories)
|
|
||||||
|
|
||||||
def on_add_clicked(self,obj):
|
def on_add_clicked(self,obj):
|
||||||
store,iter = self.av_model.get_selected()
|
store,iter = self.av_model.get_selected()
|
||||||
if not iter:
|
if not iter:
|
||||||
return
|
return
|
||||||
data = self.av_model.get_data(iter,range(self.av_ncols))
|
data = self.av_model.get_data(iter,range(self.av_ncols))
|
||||||
data.append([])
|
self.max_key = self.max_key + 1
|
||||||
|
newkey = str(self.max_key)
|
||||||
|
data.append(newkey)
|
||||||
self.bk_model.add(data)
|
self.bk_model.add(data)
|
||||||
|
for book_item in Plugins._bkitems:
|
||||||
|
if book_item[0] == data[0]:
|
||||||
|
self.item_storage[newkey] = list(book_item)
|
||||||
|
|
||||||
def on_remove_clicked(self,obj):
|
def on_remove_clicked(self,obj):
|
||||||
store,iter = self.bk_model.get_selected()
|
store,iter = self.bk_model.get_selected()
|
||||||
if not iter:
|
if not iter:
|
||||||
return
|
return
|
||||||
|
data = self.bk_model.get_data(iter,range(self.bk_ncols))
|
||||||
|
key = data[2]
|
||||||
|
del self.item_storage[key]
|
||||||
self.bk_model.remove(iter)
|
self.bk_model.remove(iter)
|
||||||
|
|
||||||
def on_clear_clicked(self,obj):
|
def on_clear_clicked(self,obj):
|
||||||
self.bk_model.clear()
|
self.bk_model.clear()
|
||||||
|
self.item_storage.clear()
|
||||||
|
|
||||||
def on_up_clicked(self,obj):
|
def on_up_clicked(self,obj):
|
||||||
row = self.bk_model.get_selected_row()
|
row = self.bk_model.get_selected_row()
|
||||||
@ -188,7 +186,17 @@ class BookReportSelector:
|
|||||||
if not iter:
|
if not iter:
|
||||||
return
|
return
|
||||||
data = self.bk_model.get_data(iter,range(self.bk_ncols))
|
data = self.bk_model.get_data(iter,range(self.bk_ncols))
|
||||||
ReportOptionsDialog(self.db,self.person,data[0])
|
key = data[2]
|
||||||
|
book_item = self.item_storage[key]
|
||||||
|
options_dialog = book_item[2]
|
||||||
|
get_opt = book_item[4]
|
||||||
|
get_stl = book_item[5]
|
||||||
|
opt_dlg = options_dialog(self.db,self.person,get_opt,get_stl)
|
||||||
|
book_item[4] = opt_dlg.get_options
|
||||||
|
book_item[5] = opt_dlg.get_style
|
||||||
|
self.item_storage[key] = book_item
|
||||||
|
self.person = opt_dlg.person
|
||||||
|
#print opt_dlg.person.getPrimaryName().getRegularName()
|
||||||
|
|
||||||
def bk_double_click(self,obj,event):
|
def bk_double_click(self,obj,event):
|
||||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||||
@ -198,62 +206,83 @@ class BookReportSelector:
|
|||||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||||
self.on_add_clicked(obj)
|
self.on_add_clicked(obj)
|
||||||
|
|
||||||
def on_book_ok_clicked(self,obj): pass
|
def on_book_ok_clicked(self,obj):
|
||||||
|
if self.bk_model.count:
|
||||||
def titlepage(self): pass
|
item_list = []
|
||||||
|
for row in range(self.bk_model.count):
|
||||||
def toc(self): pass
|
self.bk_model.select_row(row)
|
||||||
|
store,iter = self.bk_model.get_selected()
|
||||||
|
data = self.bk_model.get_data(iter,range(self.bk_ncols))
|
||||||
|
key = data[2]
|
||||||
|
book_item = self.item_storage[key]
|
||||||
|
item_list.append(book_item)
|
||||||
|
BookReportDialog(self.db,self.person,item_list)
|
||||||
|
self.top.destroy()
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
# The final dialog - paper, format, target, etc.
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
class ReportOptionsDialog(Report.BareReportDialog):
|
class BookReportDialog(Report.ReportDialog):
|
||||||
|
def __init__(self,database,person,item_list):
|
||||||
def __init__(self,database,person,rep_title):
|
|
||||||
self.rep_title = rep_title
|
|
||||||
Report.BareReportDialog.__init__(self,database,person)
|
Report.BareReportDialog.__init__(self,database,person)
|
||||||
|
self.item_list = item_list
|
||||||
|
book_item = item_list[0]
|
||||||
|
get_style = book_item[5]
|
||||||
|
self.selected_style = get_style()
|
||||||
|
self.database = database
|
||||||
|
self.person = person
|
||||||
|
|
||||||
|
def setup_style_frame(self): pass
|
||||||
|
def setup_report_options_frame(self): pass
|
||||||
|
def setup_other_frames(self): pass
|
||||||
|
def parse_style_frame(self): pass
|
||||||
|
def parse_report_options_frame(self): pass
|
||||||
|
def parse_other_frames(self): pass
|
||||||
|
|
||||||
|
def doc_uses_tables(self):
|
||||||
|
return 1
|
||||||
|
|
||||||
def get_title(self):
|
def get_title(self):
|
||||||
"""The window title for this dialog"""
|
return _("Book Report")
|
||||||
return _("%s - GRAMPS Book") % self.rep_title
|
|
||||||
|
|
||||||
def get_header(self, name):
|
def get_header(self,name):
|
||||||
"""The header line at the top of the dialog contents"""
|
return _("Book Report")
|
||||||
return _("%s for GRAMPS Book") % self.rep_title
|
|
||||||
|
|
||||||
def setup_format_frame(self):
|
def make_doc_menu(self):
|
||||||
center_label = gtk.Label("<b>%s</b>" % _("Center Person"))
|
"""Build a menu of document types that are appropriate for
|
||||||
center_label.set_use_markup(gtk.TRUE)
|
this text report. This menu will be generated based upon
|
||||||
center_label.set_alignment(0.0,0.5)
|
whether the document requires table support, etc."""
|
||||||
self.tbl.set_border_width(12)
|
Plugins.get_text_doc_menu(self.format_menu, self.doc_uses_tables(),
|
||||||
self.tbl.attach(center_label,0,4,1,2,gtk.SHRINK|gtk.FILL)
|
self.doc_type_changed)
|
||||||
|
|
||||||
name = self.person.getPrimaryName().getRegularName()
|
def make_document(self):
|
||||||
self.person_label = gtk.Label( "<i>%s</i>" % name )
|
"""Create a document of the type requested by the user."""
|
||||||
self.person_label.set_use_markup(gtk.TRUE)
|
self.doc = self.format(self.selected_style,self.paper,
|
||||||
self.person_label.set_alignment(0.0,0.5)
|
self.template_name,self.orien)
|
||||||
self.tbl.attach(self.person_label,2,3,2,3)
|
self.doc.open(self.target_path)
|
||||||
|
|
||||||
change_button = gtk.Button("%s..." % _('_Change') )
|
def make_report(self):
|
||||||
change_button.connect('clicked',self.on_change_clicked)
|
"""Create the contents of the report. This is a simple
|
||||||
self.tbl.attach(change_button,3,4,2,3,gtk.SHRINK|gtk.SHRINK)
|
default implementation suitable for testing. Is should be
|
||||||
|
overridden to produce a real report."""
|
||||||
|
self.doc.start_paragraph("Title")
|
||||||
|
title = _("Book Report")
|
||||||
|
self.doc.write_text(title)
|
||||||
|
self.doc.end_paragraph()
|
||||||
|
for book_item in self.item_list:
|
||||||
|
write_book_item = book_item[3]
|
||||||
|
get_options = book_item[4]
|
||||||
|
item_options = get_options()
|
||||||
|
if write_book_item:
|
||||||
|
write_book_item(self.database,self.person,self.doc,item_options)
|
||||||
|
|
||||||
def on_change_clicked(self,obj):
|
self.doc.close()
|
||||||
import SelectPerson
|
|
||||||
sel_person = SelectPerson.SelectPerson(self.db,'Select Person')
|
|
||||||
new_person = sel_person.run()
|
|
||||||
if new_person:
|
|
||||||
new_name = new_person.getPrimaryName().getRegularName()
|
|
||||||
if new_name:
|
|
||||||
self.person_label.set_text( "<i>%s</i>" % new_name )
|
|
||||||
self.person_label.set_use_markup(gtk.TRUE)
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
# Function to register the overall book report
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def report(database,person):
|
def report(database,person):
|
||||||
|
@ -52,7 +52,7 @@ from intl import gettext as _
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
class FtmDescendantReport(Report.Report):
|
class FtmDescendantReport(Report.Report):
|
||||||
|
|
||||||
def __init__(self,database,person,output,max,doc,pgbrk):
|
def __init__(self,database,person,max,pgbrk,doc,output):
|
||||||
self.anc_map = {}
|
self.anc_map = {}
|
||||||
self.gen_map = {}
|
self.gen_map = {}
|
||||||
self.database = database
|
self.database = database
|
||||||
@ -60,7 +60,11 @@ class FtmDescendantReport(Report.Report):
|
|||||||
self.max_generations = max
|
self.max_generations = max
|
||||||
self.pgbrk = pgbrk
|
self.pgbrk = pgbrk
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doc.open(output)
|
if output:
|
||||||
|
self.standalone = 1
|
||||||
|
self.doc.open(output)
|
||||||
|
else:
|
||||||
|
self.standalone = 0
|
||||||
self.sref_map = {}
|
self.sref_map = {}
|
||||||
self.sref_index = 1
|
self.sref_index = 1
|
||||||
|
|
||||||
@ -215,7 +219,8 @@ class FtmDescendantReport(Report.Report):
|
|||||||
self.print_children(person)
|
self.print_children(person)
|
||||||
|
|
||||||
self.write_endnotes()
|
self.write_endnotes()
|
||||||
self.doc.close()
|
if self.standalone:
|
||||||
|
self.doc.close()
|
||||||
|
|
||||||
def write_endnotes(self):
|
def write_endnotes(self):
|
||||||
keys = self.sref_map.keys()
|
keys = self.sref_map.keys()
|
||||||
@ -1119,9 +1124,58 @@ class FtmDescendantReport(Report.Report):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
def _make_default_style(self):
|
||||||
|
"""Make the default output style for the FTM Style Descendant report."""
|
||||||
|
font = TextDoc.FontStyle()
|
||||||
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set_font(font)
|
||||||
|
para.set_header_level(1)
|
||||||
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
|
para.set(pad=0.5)
|
||||||
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
|
self.default_style.add_style("Title",para)
|
||||||
|
|
||||||
|
font = TextDoc.FontStyle()
|
||||||
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set_font(font)
|
||||||
|
para.set_header_level(2)
|
||||||
|
para.set(pad=0.5)
|
||||||
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
|
para.set_description(_('The style used for the generation header.'))
|
||||||
|
self.default_style.add_style("Generation",para)
|
||||||
|
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
||||||
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
|
self.default_style.add_style("Entry",para)
|
||||||
|
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set(lmargin=1.0,pad=0.05)
|
||||||
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
|
self.default_style.add_style("Details",para)
|
||||||
|
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
|
self.default_style.add_style("SubEntry",para)
|
||||||
|
|
||||||
|
para = TextDoc.ParagraphStyle()
|
||||||
|
para.set(pad=0.05)
|
||||||
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
|
self.default_style.add_style("Endnotes",para)
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Dialog for a standalone report
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
class FtmDescendantReportDialog(Report.TextReportDialog):
|
class FtmDescendantReportDialog(Report.TextReportDialog):
|
||||||
def __init__(self,database,person):
|
def __init__(self,database,person):
|
||||||
Report.TextReportDialog.__init__(self,database,person)
|
Report.TextReportDialog.__init__(self,database,person)
|
||||||
|
self.make_default_style = _make_default_style
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1145,56 +1199,13 @@ class FtmDescendantReportDialog(Report.TextReportDialog):
|
|||||||
"""Where to save styles for this report."""
|
"""Where to save styles for this report."""
|
||||||
return "ftm_descendant_report.xml"
|
return "ftm_descendant_report.xml"
|
||||||
|
|
||||||
def make_default_style(self):
|
|
||||||
"""Make the default output style for the FTM Style Descendant report."""
|
|
||||||
font = TextDoc.FontStyle()
|
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set_font(font)
|
|
||||||
para.set_header_level(1)
|
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
|
||||||
para.set(pad=0.5)
|
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
|
||||||
self.default_style.add_style("Title",para)
|
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set_font(font)
|
|
||||||
para.set_header_level(2)
|
|
||||||
para.set(pad=0.5)
|
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
|
||||||
para.set_description(_('The style used for the generation header.'))
|
|
||||||
self.default_style.add_style("Generation",para)
|
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
|
||||||
self.default_style.add_style("Entry",para)
|
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set(lmargin=1.0,pad=0.05)
|
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
|
||||||
self.default_style.add_style("Details",para)
|
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set(lmargin=1.0,pad=0.25)
|
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
|
||||||
self.default_style.add_style("SubEntry",para)
|
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
|
||||||
para.set(pad=0.05)
|
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
|
||||||
self.default_style.add_style("Endnotes",para)
|
|
||||||
|
|
||||||
|
|
||||||
def make_report(self):
|
def make_report(self):
|
||||||
"""Create the object that will produce the FTM Style Descendant Report.
|
"""Create the object that will produce the FTM Style Descendant Report.
|
||||||
All user dialog has already been handled and the output file
|
All user dialog has already been handled and the output file
|
||||||
opened."""
|
opened."""
|
||||||
try:
|
try:
|
||||||
MyReport = FtmDescendantReport(self.db, self.person, self.target_path,
|
MyReport = FtmDescendantReport(self.db, self.person,
|
||||||
self.max_gen, self.doc, self.pg_brk)
|
self.max_gen, self.pg_brk, self.doc, self.target_path)
|
||||||
MyReport.write_report()
|
MyReport.write_report()
|
||||||
except Errors.ReportError, msg:
|
except Errors.ReportError, msg:
|
||||||
(m1,m2) = msg.messages()
|
(m1,m2) = msg.messages()
|
||||||
@ -1208,13 +1219,117 @@ class FtmDescendantReportDialog(Report.TextReportDialog):
|
|||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
# Standalone report function
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def report(database,person):
|
def report(database,person):
|
||||||
FtmDescendantReportDialog(database,person)
|
FtmDescendantReportDialog(database,person)
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up sane defaults for the book_item
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
class FakeObj(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
fo = FakeObj()
|
||||||
|
fo.default_style = TextDoc.StyleSheet()
|
||||||
|
|
||||||
|
_make_default_style(fo)
|
||||||
|
_style = fo.default_style
|
||||||
|
_max_gen = 10
|
||||||
|
_pg_brk = 0
|
||||||
|
|
||||||
|
def options_dialog(database,person):
|
||||||
|
FtmDescendantBareReportDialog(database,person)
|
||||||
|
|
||||||
|
def get_style():
|
||||||
|
return _style
|
||||||
|
|
||||||
|
def get_options():
|
||||||
|
return [ None, _max_gen, _pg_brk ]
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Book Item Options dialog
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
class FtmDescendantBareReportDialog(Report.BareReportDialog):
|
||||||
|
|
||||||
|
def __init__(self,database,person,get_opt,get_stl):
|
||||||
|
|
||||||
|
options = get_opt()
|
||||||
|
if options[0]:
|
||||||
|
self.person = options[0]
|
||||||
|
else:
|
||||||
|
self.person = person
|
||||||
|
Report.BareReportDialog.__init__(self,database,self.person)
|
||||||
|
self.make_default_style = _make_default_style
|
||||||
|
self.max_gen = options[1]
|
||||||
|
self.pg_brk = options[2]
|
||||||
|
self.selected_style = get_stl()
|
||||||
|
|
||||||
|
self.generations_spinbox.set_value(self.max_gen)
|
||||||
|
self.pagebreak_checkbox.set_active(self.pg_brk)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Customization hooks
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
def get_title(self):
|
||||||
|
"""The window title for this dialog"""
|
||||||
|
return "%s - GRAMPS Book" % (_("FTM Style Descendant Report"))
|
||||||
|
|
||||||
|
def get_header(self, name):
|
||||||
|
"""The header line at the top of the dialog contents"""
|
||||||
|
return _("FTM Style Descendant Report for GRAMPS Book")
|
||||||
|
|
||||||
|
def get_stylesheet_savefile(self):
|
||||||
|
"""Where to save styles for this report."""
|
||||||
|
return "ftm_descendant_report.xml"
|
||||||
|
|
||||||
|
def on_ok_clicked(self, obj):
|
||||||
|
"""The user is satisfied with the dialog choices. Parse all options
|
||||||
|
and close the window."""
|
||||||
|
|
||||||
|
# Preparation
|
||||||
|
self.parse_style_frame()
|
||||||
|
self.parse_report_options_frame()
|
||||||
|
|
||||||
|
# Clean up the dialog object
|
||||||
|
self.window.destroy()
|
||||||
|
|
||||||
|
def get_options(self):
|
||||||
|
return [ self.person, self.max_gen, self.pg_brk ]
|
||||||
|
|
||||||
|
def get_style(self):
|
||||||
|
return self.selected_style
|
||||||
|
|
||||||
|
|
||||||
|
def write_book_item(database,person,doc,options):
|
||||||
|
"""Write the FTM Style Descendant Report options set.
|
||||||
|
All user dialog has already been handled and the output file opened."""
|
||||||
|
try:
|
||||||
|
if options[0]:
|
||||||
|
person = options[0]
|
||||||
|
max_gen = options[1]
|
||||||
|
pg_brk = options[2]
|
||||||
|
MyReport = FtmDescendantReport(database, person,
|
||||||
|
max_gen, pg_brk, doc, None )
|
||||||
|
MyReport.write_report()
|
||||||
|
except Errors.ReportError, msg:
|
||||||
|
(m1,m2) = msg.messages()
|
||||||
|
ErrorDialog(m1,m2)
|
||||||
|
except Errors.FilterError, msg:
|
||||||
|
(m1,m2) = msg.messages()
|
||||||
|
ErrorDialog(m1,m2)
|
||||||
|
except:
|
||||||
|
import DisplayTrace
|
||||||
|
DisplayTrace.DisplayTrace()
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -1310,7 +1425,7 @@ def get_xpm_image():
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from Plugins import register_report
|
from Plugins import register_report, register_book_item
|
||||||
|
|
||||||
register_report(
|
register_report(
|
||||||
report,
|
report,
|
||||||
@ -1323,3 +1438,12 @@ register_report(
|
|||||||
author_email="shura@alex.neuro.umn.edu"
|
author_email="shura@alex.neuro.umn.edu"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# register_book_item( name, category, dialog, write_item, get_options, get_style)
|
||||||
|
register_book_item(
|
||||||
|
_("FTM Style Descendant Report"),
|
||||||
|
_("Text"),
|
||||||
|
FtmDescendantBareReportDialog,
|
||||||
|
write_book_item,
|
||||||
|
get_options,
|
||||||
|
get_style
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user