* src/Report.py: shortened report dialog by making the Paper

Options a tab of the rest of the options
* src/plugins/AncestorReport.py: fix paragraph spacing
* src/plugins/Check.py: handle None for family
* src/plugins/DescendReport.py: fix paragraph spacing
* src/plugins/IndivComplete.py: fix paragraph spacing


svn: r5409
This commit is contained in:
Don Allingham 2005-11-20 23:17:37 +00:00
parent e0ccdacfbd
commit 9c524ad869
6 changed files with 57 additions and 47 deletions

View File

@ -1,3 +1,11 @@
2005-11-20 Don Allingham <don@gramps-project.org>
* src/Report.py: shortened report dialog by making the Paper
Options a tab of the rest of the options
* src/plugins/AncestorReport.py: fix paragraph spacing
* src/plugins/Check.py: handle None for family
* src/plugins/DescendReport.py: fix paragraph spacing
* src/plugins/IndivComplete.py: fix paragraph spacing
2005-11-20 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/plugins/FilterEditor.py: Corrected plugin registration
* src/GrampsCfg.py: Add validation for GRAMPS ID prefixes

View File

@ -397,8 +397,8 @@ class BareReportDialog:
self.init_interface()
def init_interface(self):
self.output_notebook = None
self.notebook_page = 1
#self.output_notebook = None
#self.notebook_page = 1
self.pagecount_menu = None
self.filter_combo = None
self.extra_menu = None
@ -449,11 +449,17 @@ class BareReportDialog:
self.setup_target_frame()
self.setup_format_frame()
self.setup_style_frame()
self.setup_output_notebook()
#self.setup_output_notebook()
self.notebook = gtk.Notebook()
self.notebook.set_border_width(6)
self.window.vbox.add(self.notebook)
self.setup_paper_frame()
self.setup_html_frame()
self.setup_report_options_frame()
self.setup_other_frames()
self.notebook.set_current_page(0)
self.window.show_all()
def get_title(self):
@ -717,16 +723,8 @@ class BareReportDialog:
label.set_alignment(0.0,0.5)
label.set_use_markup(True)
if len(self.frame_names) == 0:
table.attach(label,0,3,0,1)
table.set_border_width(12)
self.window.vbox.add(table)
else:
table.set_border_width(6)
self.notebook = gtk.Notebook()
self.notebook.set_border_width(6)
self.window.vbox.add(self.notebook)
self.notebook.append_page(table,label)
table.set_border_width(6)
self.notebook.append_page(table,label)
row += 1
if len(self.local_filters):
@ -1003,6 +1001,7 @@ class ReportDialog(BareReportDialog):
for a basic *stand-alone* report."""
self.style_name = "default"
self.page_html_added = False
BareReportDialog.__init__(self,database,person,option_class,
name,translated_name)
@ -1124,15 +1123,18 @@ class ReportDialog(BareReportDialog):
# Is this to be a printed report or an electronic report
# (i.e. a set of web pages)
if self.page_html_added:
self.notebook.remove_page(0)
if obj.get_paper() == 1:
self.notebook_page = 0
self.paper_label = gtk.Label('<b>%s</b>'%_("Paper Options"))
self.paper_label.set_use_markup(True)
self.notebook.insert_page(self.paper_table,self.paper_label,0)
self.paper_table.show_all()
else:
self.notebook_page = 1
if self.output_notebook == None:
return
self.output_notebook.set_current_page(self.notebook_page)
self.html_label = gtk.Label('<b>%s</b>' % _("HTML Options"))
self.html_label.set_use_markup(True)
self.notebook.insert_page(self.html_table,self.html_label,0)
self.html_table.show_all()
if not self.get_target_is_directory():
fname = self.target_fileentry.get_full_path(0)
@ -1149,6 +1151,7 @@ class ReportDialog(BareReportDialog):
if self.style_button:
self.style_button.set_sensitive(obj.get_styles())
self.style_menu.set_sensitive(obj.get_styles())
self.page_html_added = True
#------------------------------------------------------------------------
#
@ -1227,13 +1230,7 @@ class ReportDialog(BareReportDialog):
"""Set up the output notebook of the dialog. This sole
purpose of this function is to grab a pointer for later use in
the callback from when the file format is changed."""
self.output_notebook = gtk.Notebook()
self.output_notebook.set_show_tabs(0)
self.output_notebook.set_show_border(0)
self.output_notebook.set_border_width(12)
self.output_notebook.set_current_page(self.notebook_page)
self.window.vbox.add(self.output_notebook)
pass
def size_changed(self,obj):
(paper,name) = self.papersize_menu.get_value()
@ -1261,13 +1258,7 @@ class ReportDialog(BareReportDialog):
self.paper_table.set_col_spacings(12)
self.paper_table.set_row_spacings(6)
self.paper_table.set_border_width(0)
self.output_notebook.append_page(self.paper_table,gtk.Label(_("Paper Options")))
paper_label = gtk.Label("<b>%s</b>" % _("Paper Options"))
paper_label.set_use_markup(True)
paper_label.set_alignment(0.0,0.5)
self.paper_table.attach(paper_label,0,6,0,1,gtk.SHRINK|gtk.FILL)
self.papersize_menu = PaperMenu.GrampsPaperComboBox()
self.papersize_menu.connect('changed',self.size_changed)
@ -1340,13 +1331,6 @@ class ReportDialog(BareReportDialog):
self.html_table.set_col_spacings(12)
self.html_table.set_row_spacings(6)
self.html_table.set_border_width(0)
html_label = gtk.Label("<b>%s</b>" % _("HTML Options"))
html_label.set_alignment(0.0,0.5)
html_label.set_use_markup(True)
self.html_table.attach(html_label,0,3,0,1)
label = gtk.Label(_("HTML Options"))
self.output_notebook.append_page(self.html_table,label)
label = gtk.Label("%s:" % _("Template"))
label.set_alignment(0.0,0.5)

View File

@ -164,7 +164,9 @@ class AncestorOptions(ReportOptions.ReportOptions):
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set(pad=0.5)
para.set_top_margin(0.25)
para.set_bottom_margin(0.25)
#para.set(pad=0.5)
para.set_description(_('The style used for the title of the page.'))
default_style.add_style("AHN-Title",para)
@ -173,12 +175,16 @@ class AncestorOptions(ReportOptions.ReportOptions):
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
para.set_top_margin(0.125)
para.set_bottom_margin(0.125)
#para.set(pad=0.5)
para.set_description(_('The style used for the generation header.'))
default_style.add_style("AHN-Generation",para)
para = BaseDoc.ParagraphStyle()
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
para.set(first_indent=-1.0,lmargin=1.0)
para.set_top_margin(0.125)
para.set_bottom_margin(0.125)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("AHN-Entry",para)

View File

@ -762,7 +762,7 @@ class CheckIntegrity:
if family:
pn = Utils.family_name(family,self.db)
else:
pn = family.gramps_id
pn = _("None")
self.text.write('\t')
self.text.write(_("%s was restored to the family of %s\n") % (cn,pn))

View File

@ -214,7 +214,8 @@ class DescendantOptions(ReportOptions.ReportOptions):
p = BaseDoc.ParagraphStyle()
p.set_header_level(1)
p.set_bottom_border(1)
p.set_padding(ReportUtils.pt2cm(6))
p.set_top_margin(ReportUtils.pt2cm(3))
p.set_bottom_margin(ReportUtils.pt2cm(3))
p.set_font(f)
p.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
p.set_description(_("The style used for the title of the page."))
@ -225,7 +226,8 @@ class DescendantOptions(ReportOptions.ReportOptions):
for i in range(1,32):
p = BaseDoc.ParagraphStyle()
p.set_font(f)
p.set_padding(ReportUtils.pt2cm(f.get_size()*0.25))
p.set_top_margin(ReportUtils.pt2cm(f.get_size()*0.125))
p.set_bottom_margin(ReportUtils.pt2cm(f.get_size()*0.125))
p.set_first_indent(-0.5)
p.set_left_margin(min(10.0,float(i-0.5)))
p.set_description(_("The style used for the level %d display.") % i)
@ -233,7 +235,8 @@ class DescendantOptions(ReportOptions.ReportOptions):
p = BaseDoc.ParagraphStyle()
p.set_font(f)
p.set_padding(ReportUtils.pt2cm(f.get_size()*0.25))
p.set_top_margin(ReportUtils.pt2cm(f.get_size()*0.125))
p.set_bottom_margin(ReportUtils.pt2cm(f.get_size()*0.125))
p.set_left_margin(min(10.0,float(i-0.5)))
p.set_description(_("The style used for the spouse level %d display.") % i)
default_style.add_style("DR-Spouse%d" % i,p)

View File

@ -44,6 +44,7 @@ import RelLib
import const
import BaseDoc
import Report
import ReportUtils
import GenericFilter
import ReportOptions
@ -557,6 +558,8 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
font.set_size(16)
p = BaseDoc.ParagraphStyle()
p.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
p.set_top_margin(ReportUtils.pt2cm(8))
p.set_bottom_margin(ReportUtils.pt2cm(8))
p.set_font(font)
p.set_description(_("The style used for the title of the page."))
default_style.add_style("IDS-Title",p)
@ -568,6 +571,8 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
font.set_italic(1)
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_top_margin(ReportUtils.pt2cm(3))
p.set_bottom_margin(ReportUtils.pt2cm(3))
p.set_description(_("The style used for category labels."))
default_style.add_style("IDS-TableTitle",p)
@ -577,6 +582,8 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
font.set_size(12)
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_top_margin(ReportUtils.pt2cm(3))
p.set_bottom_margin(ReportUtils.pt2cm(3))
p.set_description(_("The style used for the spouse's name."))
default_style.add_style("IDS-Spouse",p)
@ -584,6 +591,8 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
font.set_size(12)
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_top_margin(ReportUtils.pt2cm(3))
p.set_bottom_margin(ReportUtils.pt2cm(3))
p.set_description(_('The basic style used for the text display.'))
default_style.add_style("IDS-Normal",p)