* src/gramps_main.py (open_example): Fix destination name when copying
files (was directory name). * doc/gramps-manual/C/gramps-manual.xml: Reflect name change for Comprehensive Ancestors Report. * src/plugins/AncestorReport.py: Prefixed style names ("AHN:"). * src/plugins/Ancestors.py: Prefixed style names ("AR:"). * src/plugins/DescendReport.py: Prefixed style names ("DR:"). * src/plugins/DetAncestralReport.py: Prefixed style names ("DAR:"). * src/plugins/DetDescendantReport.py: Prefixed style names ("DDR:"). * src/plugins/FtmStyleAncestors.py: Prefixed style names ("FTA:"). * src/plugins/FtmStyleDescendants.py: Prefixed style names ("FTD:"). * src/plugins/FamilyGroup.py: Prefixed style names ("FGR:"). * src/plugins/CustomBookText.py: Prefixed style names ("CBT:"). * src/plugins/SimpleBookTitle.py: Prefixed style names ("SBT:"). Rename "Copyright string" with "Subtitle string". * src/plugins/BookReport.py (BookReportDialog.__init__): Finally, clear the style problem. svn: r1901
This commit is contained in:
parent
e913f0a32b
commit
f8d2f86295
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
|||||||
|
2003-07-11 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/gramps_main.py (open_example): Fix destination name when copying
|
||||||
|
files (was directory name).
|
||||||
|
* doc/gramps-manual/C/gramps-manual.xml: Reflect name change for
|
||||||
|
Comprehensive Ancestors Report.
|
||||||
|
* src/plugins/AncestorReport.py: Prefixed style names ("AHN:").
|
||||||
|
* src/plugins/Ancestors.py: Prefixed style names ("AR:").
|
||||||
|
* src/plugins/DescendReport.py: Prefixed style names ("DR:").
|
||||||
|
* src/plugins/DetAncestralReport.py: Prefixed style names ("DAR:").
|
||||||
|
* src/plugins/DetDescendantReport.py: Prefixed style names ("DDR:").
|
||||||
|
* src/plugins/FtmStyleAncestors.py: Prefixed style names ("FTA:").
|
||||||
|
* src/plugins/FtmStyleDescendants.py: Prefixed style names ("FTD:").
|
||||||
|
* src/plugins/FamilyGroup.py: Prefixed style names ("FGR:").
|
||||||
|
* src/plugins/CustomBookText.py: Prefixed style names ("CBT:").
|
||||||
|
* src/plugins/SimpleBookTitle.py: Prefixed style names ("SBT:").
|
||||||
|
Rename "Copyright string" with "Subtitle string".
|
||||||
|
* src/plugins/BookReport.py (BookReportDialog.__init__): Finally,
|
||||||
|
clear the style problem.
|
||||||
|
|
||||||
2003-07-17 Tim Waugh <twaugh@redhat.com>
|
2003-07-17 Tim Waugh <twaugh@redhat.com>
|
||||||
* src/plugins/Ancestors.py: Handle unknown genders and missing
|
* src/plugins/Ancestors.py: Handle unknown genders and missing
|
||||||
first names. Include grandchildren's birth dates in
|
first names. Include grandchildren's birth dates in
|
||||||
|
@ -2849,10 +2849,10 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term>Ancestors Report</term>
|
<varlistentry><term>Comprehensive Ancestors Report</term>
|
||||||
<listitem><para>This report produces a detailed description
|
<listitem><para>This report produces a comprehensive description
|
||||||
of ancestors of the active person. The highlights of this report
|
of ancestors of the active person. The highlights of this report
|
||||||
include specific layout, images of children, present and former
|
include elaborate layout, images of children, present and former
|
||||||
spouses, and source citations. Specific options: number
|
spouses, and source citations. Specific options: number
|
||||||
of backward generations to consider, whether to cite sources,
|
of backward generations to consider, whether to cite sources,
|
||||||
and whether to break pages between generations. </para></listitem>
|
and whether to break pages between generations. </para></listitem>
|
||||||
|
@ -2016,9 +2016,11 @@ class Gramps:
|
|||||||
try:
|
try:
|
||||||
dir = "%s/share/gramps/example" % const.prefixdir
|
dir = "%s/share/gramps/example" % const.prefixdir
|
||||||
for file in os.listdir(dir):
|
for file in os.listdir(dir):
|
||||||
shutil.copyfile("%s/%s" % (dir,file), dest)
|
shutil.copyfile("%s/%s" % (dir,file),
|
||||||
|
"%s/%s" % (dest,file) )
|
||||||
try:
|
try:
|
||||||
shutil.copystat("%s/%s" % (dir,file), dest)
|
shutil.copystat("%s/%s" % (dir,file),
|
||||||
|
"%s/%s" % (dest,file))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except IOError,msg:
|
except IOError,msg:
|
||||||
|
@ -79,7 +79,7 @@ class AncestorReport(Report.Report):
|
|||||||
self.filter(self.start,1)
|
self.filter(self.start,1)
|
||||||
|
|
||||||
name = self.start.getPrimaryName().getRegularName()
|
name = self.start.getPrimaryName().getRegularName()
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("AHN:Title")
|
||||||
title = _("Ahnentafel Report for %s") % name
|
title = _("Ahnentafel Report for %s") % name
|
||||||
self.doc.write_text(title)
|
self.doc.write_text(title)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -92,13 +92,13 @@ class AncestorReport(Report.Report):
|
|||||||
if generation == 0 or key >= ( 1 << 30):
|
if generation == 0 or key >= ( 1 << 30):
|
||||||
if self.pgbrk and generation > 0:
|
if self.pgbrk and generation > 0:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("AHN:Generation")
|
||||||
t = _("%s Generation") % AncestorReport.gen[generation+1]
|
t = _("%s Generation") % AncestorReport.gen[generation+1]
|
||||||
self.doc.write_text(t)
|
self.doc.write_text(t)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
generation = generation + 1
|
generation = generation + 1
|
||||||
|
|
||||||
self.doc.start_paragraph("Entry","%s." % str(key))
|
self.doc.start_paragraph("AHN:Entry","%s." % str(key))
|
||||||
person = self.map[key]
|
person = self.map[key]
|
||||||
name = person.getPrimaryName().getRegularName()
|
name = person.getPrimaryName().getRegularName()
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_header_level(1)
|
para.set_header_level(1)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("AHN:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -400,12 +400,12 @@ def _make_default_style(default_style):
|
|||||||
para.set_header_level(2)
|
para.set_header_level(2)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the generation header.'))
|
para.set_description(_('The style used for the generation header.'))
|
||||||
default_style.add_style("Generation",para)
|
default_style.add_style("AHN:Generation",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("AHN:Entry",para)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -57,12 +57,12 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
table = TextDoc.TableStyle ()
|
table = TextDoc.TableStyle ()
|
||||||
table.set_column_widths ([15, 85])
|
table.set_column_widths ([15, 85])
|
||||||
table.set_width (100)
|
table.set_width (100)
|
||||||
doc.add_table_style ("PersonNoSpouse", table)
|
doc.add_table_style ("AR:PersonNoSpouse", table)
|
||||||
|
|
||||||
table = TextDoc.TableStyle ()
|
table = TextDoc.TableStyle ()
|
||||||
table.set_column_widths ([10, 15, 75])
|
table.set_column_widths ([10, 15, 75])
|
||||||
table.set_width (100)
|
table.set_width (100)
|
||||||
doc.add_table_style ("ChildNoSpouse", table)
|
doc.add_table_style ("AR:ChildNoSpouse", table)
|
||||||
|
|
||||||
for nspouse in range (1, 3):
|
for nspouse in range (1, 3):
|
||||||
table = TextDoc.TableStyle ()
|
table = TextDoc.TableStyle ()
|
||||||
@ -70,18 +70,18 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
widths = [15, 100 - 15 * (nspouse + 1)]
|
widths = [15, 100 - 15 * (nspouse + 1)]
|
||||||
widths.extend ([15] * nspouse)
|
widths.extend ([15] * nspouse)
|
||||||
table.set_column_widths (widths)
|
table.set_column_widths (widths)
|
||||||
doc.add_table_style ("PersonWithSpouse%d" % nspouse, table)
|
doc.add_table_style ("AR:PersonWithSpouse%d" % nspouse, table)
|
||||||
|
|
||||||
table = TextDoc.TableStyle ()
|
table = TextDoc.TableStyle ()
|
||||||
table.set_width (100)
|
table.set_width (100)
|
||||||
widths = [10, 15, 90 - 15 * (nspouse + 1)]
|
widths = [10, 15, 90 - 15 * (nspouse + 1)]
|
||||||
widths.extend ([15] * nspouse)
|
widths.extend ([15] * nspouse)
|
||||||
table.set_column_widths (widths)
|
table.set_column_widths (widths)
|
||||||
doc.add_table_style ("ChildWithSpouse%d"% nspouse, table)
|
doc.add_table_style ("AR:ChildWithSpouse%d"% nspouse, table)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle ()
|
cell = TextDoc.TableCellStyle ()
|
||||||
cell.set_padding (1) # each side makes 2cm, the size of the photo
|
cell.set_padding (1) # each side makes 2cm, the size of the photo
|
||||||
doc.add_cell_style ("PaddedCell", cell)
|
doc.add_cell_style ("AR:PaddedCell", cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle ()
|
cell = TextDoc.TableCellStyle ()
|
||||||
cell.set_padding (0.1)
|
cell.set_padding (0.1)
|
||||||
@ -89,15 +89,15 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
cell.set_top_border (1)
|
cell.set_top_border (1)
|
||||||
cell.set_right_border (1)
|
cell.set_right_border (1)
|
||||||
cell.set_bottom_border (1)
|
cell.set_bottom_border (1)
|
||||||
doc.add_cell_style ("NoPhoto", cell)
|
doc.add_cell_style ("AR:NoPhoto", cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle ()
|
cell = TextDoc.TableCellStyle ()
|
||||||
cell.set_padding (0.1)
|
cell.set_padding (0.1)
|
||||||
doc.add_cell_style ("Photo", cell)
|
doc.add_cell_style ("AR:Photo", cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle ()
|
cell = TextDoc.TableCellStyle ()
|
||||||
cell.set_padding (0.1)
|
cell.set_padding (0.1)
|
||||||
doc.add_cell_style ("Entry", cell)
|
doc.add_cell_style ("AR:Entry", cell)
|
||||||
|
|
||||||
if output:
|
if output:
|
||||||
self.standalone = 1
|
self.standalone = 1
|
||||||
@ -111,12 +111,12 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
self.sources = []
|
self.sources = []
|
||||||
name = self.person_name (self.start)
|
name = self.person_name (self.start)
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("AR:Title")
|
||||||
title = _("Ancestors of %s") % name
|
title = _("Ancestors of %s") % name
|
||||||
self.doc.write_text(title)
|
self.doc.write_text(title)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
self.doc.start_paragraph ("Heading")
|
self.doc.start_paragraph ("AR:Heading")
|
||||||
self.doc.write_text ("Generation 1")
|
self.doc.write_text ("Generation 1")
|
||||||
self.doc.end_paragraph ()
|
self.doc.end_paragraph ()
|
||||||
|
|
||||||
@ -127,11 +127,11 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
self.generation (self.max_generations, families, [self.start])
|
self.generation (self.max_generations, families, [self.start])
|
||||||
|
|
||||||
if len (self.sources) > 0:
|
if len (self.sources) > 0:
|
||||||
self.doc.start_paragraph ("Heading")
|
self.doc.start_paragraph ("AR:Heading")
|
||||||
self.doc.write_text ("Sources")
|
self.doc.write_text ("Sources")
|
||||||
self.doc.end_paragraph ()
|
self.doc.end_paragraph ()
|
||||||
|
|
||||||
self.doc.start_paragraph ("Entry")
|
self.doc.start_paragraph ("AR:Entry")
|
||||||
i = 1
|
i = 1
|
||||||
for source in self.sources:
|
for source in self.sources:
|
||||||
self.doc.write_text ("[%d] %s\n" % (i, source.getTitle ()))
|
self.doc.write_text ("[%d] %s\n" % (i, source.getTitle ()))
|
||||||
@ -181,7 +181,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
children = family.getChildList ()
|
children = family.getChildList ()
|
||||||
if len (children):
|
if len (children):
|
||||||
ret.append ((self.doc.start_paragraph, ['ChildTitle']))
|
ret.append ((self.doc.start_paragraph, ['AR:ChildTitle']))
|
||||||
ret.append ((self.doc.write_text, ['Their children:']))
|
ret.append ((self.doc.write_text, ['Their children:']))
|
||||||
ret.append ((self.doc.end_paragraph, []))
|
ret.append ((self.doc.end_paragraph, []))
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
if len (people):
|
if len (people):
|
||||||
if self.pgbrk:
|
if self.pgbrk:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph ("Heading")
|
self.doc.start_paragraph ("AR:Heading")
|
||||||
if thisgen > 4:
|
if thisgen > 4:
|
||||||
n = thisgen - 3
|
n = thisgen - 3
|
||||||
if n % 10 == 1 and n != 11:
|
if n % 10 == 1 and n != 11:
|
||||||
@ -297,9 +297,9 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
'right', 2, 2]))
|
'right', 2, 2]))
|
||||||
|
|
||||||
if suppress_children and len (already_described):
|
if suppress_children and len (already_described):
|
||||||
style = "Child"
|
style = "AR:Child"
|
||||||
else:
|
else:
|
||||||
style = "Person"
|
style = "AR:Person"
|
||||||
if len (spouse):
|
if len (spouse):
|
||||||
style += "WithSpouse%d" % len (spouse)
|
style += "WithSpouse%d" % len (spouse)
|
||||||
else:
|
else:
|
||||||
@ -310,24 +310,24 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
if suppress_children and len (already_described):
|
if suppress_children and len (already_described):
|
||||||
# Can't do proper formatting with TextDoc, so cheat.
|
# Can't do proper formatting with TextDoc, so cheat.
|
||||||
ret.append ((self.doc.start_cell, ["PaddedCell"]))
|
ret.append ((self.doc.start_cell, ["AR:PaddedCell"]))
|
||||||
ret.append ((self.doc.end_cell, []))
|
ret.append ((self.doc.end_cell, []))
|
||||||
|
|
||||||
if len (photos) == 0:
|
if len (photos) == 0:
|
||||||
ret.append ((self.doc.start_cell, ["NoPhoto"]))
|
ret.append ((self.doc.start_cell, ["AR:NoPhoto"]))
|
||||||
ret.append ((self.doc.start_paragraph, ["NoPhotoText"]))
|
ret.append ((self.doc.start_paragraph, ["AR:NoPhotoText"]))
|
||||||
ret.append ((self.doc.write_text, ["(no photo)"]))
|
ret.append ((self.doc.write_text, ["(no photo)"]))
|
||||||
ret.append ((self.doc.end_paragraph, []))
|
ret.append ((self.doc.end_paragraph, []))
|
||||||
ret.append ((self.doc.end_cell, []))
|
ret.append ((self.doc.end_cell, []))
|
||||||
else:
|
else:
|
||||||
ret.append ((self.doc.start_cell, ["Photo"]))
|
ret.append ((self.doc.start_cell, ["AR:Photo"]))
|
||||||
for photo in photos[:1]:
|
for photo in photos[:1]:
|
||||||
ret.append ((self.doc.add_photo,
|
ret.append ((self.doc.add_photo,
|
||||||
[photo.ref.getPath (), 'left', 2, 2]))
|
[photo.ref.getPath (), 'left', 2, 2]))
|
||||||
ret.append ((self.doc.end_cell, []))
|
ret.append ((self.doc.end_cell, []))
|
||||||
|
|
||||||
ret.append ((self.doc.start_cell, ["Entry"]))
|
ret.append ((self.doc.start_cell, ["AR:Entry"]))
|
||||||
ret.append ((self.doc.start_paragraph, ["Entry"]))
|
ret.append ((self.doc.start_paragraph, ["AR:Entry"]))
|
||||||
ret.append ((self.doc.write_text, [name]))
|
ret.append ((self.doc.write_text, [name]))
|
||||||
if short_form:
|
if short_form:
|
||||||
ret.append ((self.doc.write_text, [" (mentioned above)."]))
|
ret.append ((self.doc.write_text, [" (mentioned above)."]))
|
||||||
@ -338,7 +338,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
ret.append ((self.doc.end_cell, []))
|
ret.append ((self.doc.end_cell, []))
|
||||||
|
|
||||||
for s in spouse:
|
for s in spouse:
|
||||||
ret.append ((self.doc.start_cell, ["Photo"]))
|
ret.append ((self.doc.start_cell, ["AR:Photo"]))
|
||||||
ret.append (s)
|
ret.append (s)
|
||||||
ret.append ((self.doc.end_cell, []))
|
ret.append ((self.doc.end_cell, []))
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
paras.insert (0, (self.doc.end_paragraph, []))
|
paras.insert (0, (self.doc.end_paragraph, []))
|
||||||
paras.insert (0, (self.doc.write_text, [note[:para_end]]))
|
paras.insert (0, (self.doc.write_text, [note[:para_end]]))
|
||||||
paras.insert (0, (self.doc.start_paragraph, ['Details']))
|
paras.insert (0, (self.doc.start_paragraph, ['AR:Details']))
|
||||||
return paras
|
return paras
|
||||||
|
|
||||||
def long_notes (self, person, suppress_children = 0,
|
def long_notes (self, person, suppress_children = 0,
|
||||||
@ -665,7 +665,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
events = person.getEventList ()
|
events = person.getEventList ()
|
||||||
addresses = person.getAddressList ()
|
addresses = person.getAddressList ()
|
||||||
if (len (events) + len (addresses) + len (names)) > 0:
|
if (len (events) + len (addresses) + len (names)) > 0:
|
||||||
paras.append ((self.doc.start_paragraph, ['SubEntry']))
|
paras.append ((self.doc.start_paragraph, ['AR:SubEntry']))
|
||||||
paras.append ((self.doc.write_text,
|
paras.append ((self.doc.write_text,
|
||||||
["More about " +
|
["More about " +
|
||||||
self.first_name_or_nick (person) +
|
self.first_name_or_nick (person) +
|
||||||
@ -673,18 +673,18 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
paras.append ((self.doc.end_paragraph, []))
|
paras.append ((self.doc.end_paragraph, []))
|
||||||
|
|
||||||
for name in names:
|
for name in names:
|
||||||
paras.append ((self.doc.start_paragraph, ['Details']))
|
paras.append ((self.doc.start_paragraph, ['AR:Details']))
|
||||||
paras.append ((self.doc.write_text, [name.getType () + ': ' +
|
paras.append ((self.doc.write_text, [name.getType () + ': ' +
|
||||||
name.getRegularName ()]))
|
name.getRegularName ()]))
|
||||||
paras.append ((self.doc.end_paragraph, []))
|
paras.append ((self.doc.end_paragraph, []))
|
||||||
|
|
||||||
for event in events:
|
for event in events:
|
||||||
paras.append ((self.doc.start_paragraph, ['Details']))
|
paras.append ((self.doc.start_paragraph, ['AR:Details']))
|
||||||
paras.append ((self.doc.write_text, [self.event_info (event)]))
|
paras.append ((self.doc.write_text, [self.event_info (event)]))
|
||||||
paras.append ((self.doc.end_paragraph, []))
|
paras.append ((self.doc.end_paragraph, []))
|
||||||
|
|
||||||
for address in addresses:
|
for address in addresses:
|
||||||
paras.append ((self.doc.start_paragraph, ['Details']))
|
paras.append ((self.doc.start_paragraph, ['AR:Details']))
|
||||||
paras.append ((self.doc.write_text, [self.address_info (address)]))
|
paras.append ((self.doc.write_text, [self.address_info (address)]))
|
||||||
paras.append ((self.doc.end_paragraph, []))
|
paras.append ((self.doc.end_paragraph, []))
|
||||||
|
|
||||||
@ -700,7 +700,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("AR:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -710,38 +710,38 @@ def _make_default_style(default_style):
|
|||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set_description(_('The style used for the generation header.'))
|
para.set_description(_('The style used for the generation header.'))
|
||||||
default_style.add_style("Heading",para)
|
default_style.add_style("AR:Heading",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.25)
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("AR:Entry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle ()
|
para = TextDoc.ParagraphStyle ()
|
||||||
para.set_description(_('Text style for missing photo.'))
|
para.set_description(_('Text style for missing photo.'))
|
||||||
default_style.add_style("NoPhotoText", para)
|
default_style.add_style("AR:NoPhotoText", para)
|
||||||
|
|
||||||
details_font = TextDoc.FontStyle()
|
details_font = TextDoc.FontStyle()
|
||||||
details_font.set(face=TextDoc.FONT_SANS_SERIF,size=8,italic=1)
|
details_font.set(face=TextDoc.FONT_SANS_SERIF,size=8,italic=1)
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.5,pad=0,font = details_font)
|
para.set(lmargin=1.5,pad=0,font = details_font)
|
||||||
para.set_description(_('Style for details about a person.'))
|
para.set_description(_('Style for details about a person.'))
|
||||||
default_style.add_style("Details",para)
|
default_style.add_style("AR:Details",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.25)
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("SubEntry",para)
|
default_style.add_style("AR:SubEntry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(pad=0.05)
|
para.set(pad=0.05)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Endnotes",para)
|
default_style.add_style("AR:Endnotes",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=2.5,pad=0.05)
|
para.set(lmargin=2.5,pad=0.05)
|
||||||
para.set_description(_('Introduction to the children.'))
|
para.set_description(_('Introduction to the children.'))
|
||||||
default_style.add_style("ChildTitle",para)
|
default_style.add_style("AR:ChildTitle",para)
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -823,15 +823,25 @@ class BookReportDialog(Report.ReportDialog):
|
|||||||
self.book = book
|
self.book = book
|
||||||
self.database = database
|
self.database = database
|
||||||
self.person = person
|
self.person = person
|
||||||
self.default_style = TextDoc.StyleSheet()
|
self.selected_style = TextDoc.StyleSheet()
|
||||||
|
|
||||||
for item in self.book.get_item_list():
|
for item in self.book.get_item_list():
|
||||||
style_file = item.get_style_file()
|
# Set up default style
|
||||||
|
default_style = TextDoc.StyleSheet()
|
||||||
make_default_style = item.get_make_default_style()
|
make_default_style = item.get_make_default_style()
|
||||||
make_default_style(self.default_style)
|
make_default_style(default_style)
|
||||||
style_list = TextDoc.StyleSheetList(style_file,self.default_style)
|
|
||||||
|
# Read all style sheets available for this item
|
||||||
|
style_file = item.get_style_file()
|
||||||
|
style_list = TextDoc.StyleSheetList(style_file,default_style)
|
||||||
|
|
||||||
|
# Get the selected stylesheet
|
||||||
style_name = item.get_style_name()
|
style_name = item.get_style_name()
|
||||||
self.selected_style = style_list.get_style_sheet(style_name)
|
style_sheet = style_list.get_style_sheet(style_name)
|
||||||
|
|
||||||
|
for this_style_name in style_sheet.get_names():
|
||||||
|
self.selected_style.add_style(
|
||||||
|
this_style_name,style_sheet.get_style(this_style_name))
|
||||||
|
|
||||||
def setup_style_frame(self): pass
|
def setup_style_frame(self): pass
|
||||||
def setup_report_options_frame(self): pass
|
def setup_report_options_frame(self): pass
|
||||||
|
@ -79,15 +79,15 @@ class CustomText(Report.Report):
|
|||||||
if self.newpage:
|
if self.newpage:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
|
|
||||||
self.doc.start_paragraph('CBT-Initial')
|
self.doc.start_paragraph('CBT:Initial')
|
||||||
self.doc.write_text(self.top_text)
|
self.doc.write_text(self.top_text)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
self.doc.start_paragraph('CBT-Middle')
|
self.doc.start_paragraph('CBT:Middle')
|
||||||
self.doc.write_text(self.middle_text)
|
self.doc.write_text(self.middle_text)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
self.doc.start_paragraph('CBT-Final')
|
self.doc.start_paragraph('CBT:Final')
|
||||||
self.doc.write_text(self.bottom_text)
|
self.doc.write_text(self.bottom_text)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the first portion of the custom text.'))
|
para.set_description(_('The style used for the first portion of the custom text.'))
|
||||||
default_style.add_style("CBT-Initial",para)
|
default_style.add_style("CBT:Initial",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
|
||||||
@ -113,7 +113,7 @@ def _make_default_style(default_style):
|
|||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set_description(_('The style used for the middle portion of the custom text.'))
|
para.set_description(_('The style used for the middle portion of the custom text.'))
|
||||||
default_style.add_style("CBT-Middle",para)
|
default_style.add_style("CBT:Middle",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
|
||||||
@ -122,7 +122,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the last portion of the custom text.'))
|
para.set_description(_('The style used for the last portion of the custom text.'))
|
||||||
default_style.add_style("CBT-Final",para)
|
default_style.add_style("CBT:Final",para)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -88,7 +88,7 @@ class DescendantReport:
|
|||||||
def write_report(self):
|
def write_report(self):
|
||||||
if self.newpage:
|
if self.newpage:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("DR:Title")
|
||||||
name = self.person.getPrimaryName().getRegularName()
|
name = self.person.getPrimaryName().getRegularName()
|
||||||
self.doc.write_text(_("Descendants of %s") % name)
|
self.doc.write_text(_("Descendants of %s") % name)
|
||||||
self.dump_dates(self.person)
|
self.dump_dates(self.person)
|
||||||
@ -100,7 +100,7 @@ class DescendantReport:
|
|||||||
def dump(self,level,person):
|
def dump(self,level,person):
|
||||||
|
|
||||||
if level != 0:
|
if level != 0:
|
||||||
self.doc.start_paragraph("Level%d" % level)
|
self.doc.start_paragraph("DR:Level%d" % level)
|
||||||
self.doc.write_text("%d." % level)
|
self.doc.write_text("%d." % level)
|
||||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||||
self.dump_dates(person)
|
self.dump_dates(person)
|
||||||
@ -291,7 +291,7 @@ def _make_default_style(default_style):
|
|||||||
p.set_header_level(1)
|
p.set_header_level(1)
|
||||||
p.set_font(f)
|
p.set_font(f)
|
||||||
p.set_description(_("The style used for the title of the page."))
|
p.set_description(_("The style used for the title of the page."))
|
||||||
default_style.add_style("Title",p)
|
default_style.add_style("DR:Title",p)
|
||||||
|
|
||||||
f = TextDoc.FontStyle()
|
f = TextDoc.FontStyle()
|
||||||
for i in range(1,32):
|
for i in range(1,32):
|
||||||
@ -299,7 +299,7 @@ def _make_default_style(default_style):
|
|||||||
p.set_font(f)
|
p.set_font(f)
|
||||||
p.set_left_margin(max(10.0,float(i-1)))
|
p.set_left_margin(max(10.0,float(i-1)))
|
||||||
p.set_description(_("The style used for the level %d display.") % i)
|
p.set_description(_("The style used for the level %d display.") % i)
|
||||||
default_style.add_style("Level%d" % i,p)
|
default_style.add_style("DR:Level%d" % i,p)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -110,7 +110,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
|
|
||||||
num_children= len(family.getChildList())
|
num_children= len(family.getChildList())
|
||||||
if num_children > 0:
|
if num_children > 0:
|
||||||
self.doc.start_paragraph("ChildTitle")
|
self.doc.start_paragraph("DAR:ChildTitle")
|
||||||
if family.getMother() != None:
|
if family.getMother() != None:
|
||||||
mother= family.getMother().getPrimaryName().getRegularName()
|
mother= family.getMother().getPrimaryName().getRegularName()
|
||||||
else: mother= "unknown"
|
else: mother= "unknown"
|
||||||
@ -125,7 +125,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
for child in family.getChildList():
|
for child in family.getChildList():
|
||||||
self.doc.start_paragraph("ChildList")
|
self.doc.start_paragraph("DAR:ChildList")
|
||||||
name= child.getPrimaryName().getRegularName()
|
name= child.getPrimaryName().getRegularName()
|
||||||
birth= child.getBirth()
|
birth= child.getBirth()
|
||||||
death= child.getDeath()
|
death= child.getDeath()
|
||||||
@ -197,7 +197,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
def write_person(self, key, rptOptions):
|
def write_person(self, key, rptOptions):
|
||||||
"""Output birth, death, parentage, marriage and notes information """
|
"""Output birth, death, parentage, marriage and notes information """
|
||||||
|
|
||||||
self.doc.start_paragraph("Entry","%s." % str(key))
|
self.doc.start_paragraph("DAR:Entry","%s." % str(key))
|
||||||
|
|
||||||
person = self.map[key]
|
person = self.map[key]
|
||||||
if rptOptions.addImages == reportOptions.Yes:
|
if rptOptions.addImages == reportOptions.Yes:
|
||||||
@ -239,12 +239,12 @@ class DetAncestorReport(Report.Report):
|
|||||||
if key == 1: self.write_mate(person, rptOptions)
|
if key == 1: self.write_mate(person, rptOptions)
|
||||||
|
|
||||||
if person.getNote() != "" and rptOptions.includeNotes == reportOptions.Yes:
|
if person.getNote() != "" and rptOptions.includeNotes == reportOptions.Yes:
|
||||||
self.doc.start_paragraph("NoteHeader")
|
self.doc.start_paragraph("DAR:NoteHeader")
|
||||||
self.doc.start_bold()
|
self.doc.start_bold()
|
||||||
self.doc.write_text(_("Notes for %s" % name))
|
self.doc.write_text(_("Notes for %s" % name))
|
||||||
self.doc.end_bold()
|
self.doc.end_bold()
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DAR:Entry")
|
||||||
self.doc.write_text(person.getNote())
|
self.doc.write_text(person.getNote())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
firstName= fam.getFather().getPrimaryName().getFirstName()
|
firstName= fam.getFather().getPrimaryName().getFirstName()
|
||||||
|
|
||||||
if person != "":
|
if person != "":
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DAR:Entry")
|
||||||
|
|
||||||
if rptOptions.addImages == reportOptions.Yes:
|
if rptOptions.addImages == reportOptions.Yes:
|
||||||
self.insert_images(ind, rptOptions.imageAttrTag)
|
self.insert_images(ind, rptOptions.imageAttrTag)
|
||||||
@ -593,7 +593,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
|
|
||||||
numPhotos= numPhotos + 1
|
numPhotos= numPhotos + 1
|
||||||
if numPhotos == 1:
|
if numPhotos == 1:
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DAR:Entry")
|
||||||
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
||||||
float(vlist[1]), float(vlist[2]))
|
float(vlist[1]), float(vlist[2]))
|
||||||
#self.doc.end_paragraph()
|
#self.doc.end_paragraph()
|
||||||
@ -601,7 +601,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
elif vlist[0] == 'row':
|
elif vlist[0] == 'row':
|
||||||
numPhotos= numPhotos + 1
|
numPhotos= numPhotos + 1
|
||||||
if numPhotos == 1:
|
if numPhotos == 1:
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DAR:Entry")
|
||||||
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
||||||
float(vlist[1]), float(vlist[2]))
|
float(vlist[1]), float(vlist[2]))
|
||||||
|
|
||||||
@ -623,7 +623,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
rptOpt = self.rptOpt
|
rptOpt = self.rptOpt
|
||||||
|
|
||||||
name = self.start.getPrimaryName().getRegularName()
|
name = self.start.getPrimaryName().getRegularName()
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("DAR:Title")
|
||||||
title = _("Detailed Ancestral Report for %s") % name
|
title = _("Detailed Ancestral Report for %s") % name
|
||||||
self.doc.write_text(title)
|
self.doc.write_text(title)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -637,7 +637,7 @@ class DetAncestorReport(Report.Report):
|
|||||||
if generation == 0 or key >= 2**generation:
|
if generation == 0 or key >= 2**generation:
|
||||||
if self.pgbrk and generation > 0:
|
if self.pgbrk and generation > 0:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("DAR:Generation")
|
||||||
t = _("%s Generation") % DetAncestorReport.gen[generation+1]
|
t = _("%s Generation") % DetAncestorReport.gen[generation+1]
|
||||||
self.doc.write_text(t)
|
self.doc.write_text(t)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -675,7 +675,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_header_level(1)
|
para.set_header_level(1)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("DAR:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -683,7 +683,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_header_level(2)
|
para.set_header_level(2)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("Generation",para)
|
default_style.add_style("DAR:Generation",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
|
||||||
@ -692,22 +692,22 @@ def _make_default_style(default_style):
|
|||||||
#para.set_header_level(3)
|
#para.set_header_level(3)
|
||||||
para.set_left_margin(0.0) # in centimeters
|
para.set_left_margin(0.0) # in centimeters
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("ChildTitle",para)
|
default_style.add_style("DAR:ChildTitle",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("ChildList",para)
|
default_style.add_style("DAR:ChildList",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("NoteHeader",para)
|
default_style.add_style("DAR:NoteHeader",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("DAR:Entry",para)
|
||||||
|
|
||||||
table = TextDoc.TableStyle()
|
table = TextDoc.TableStyle()
|
||||||
table.set_width(1000)
|
table.set_width(1000)
|
||||||
|
@ -115,7 +115,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
|
|
||||||
num_children= len(family.getChildList())
|
num_children= len(family.getChildList())
|
||||||
if num_children > 0:
|
if num_children > 0:
|
||||||
self.doc.start_paragraph("ChildTitle")
|
self.doc.start_paragraph("DDR:ChildTitle")
|
||||||
if family.getMother() != None:
|
if family.getMother() != None:
|
||||||
mother= family.getMother().getPrimaryName().getRegularName()
|
mother= family.getMother().getPrimaryName().getRegularName()
|
||||||
else: mother= "unknown"
|
else: mother= "unknown"
|
||||||
@ -130,7 +130,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
for child in family.getChildList():
|
for child in family.getChildList():
|
||||||
self.doc.start_paragraph("ChildList")
|
self.doc.start_paragraph("DDR:ChildList")
|
||||||
name= child.getPrimaryName().getRegularName()
|
name= child.getPrimaryName().getRegularName()
|
||||||
birth= child.getBirth()
|
birth= child.getBirth()
|
||||||
death= child.getDeath()
|
death= child.getDeath()
|
||||||
@ -204,7 +204,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
def write_person(self, key, rptOptions):
|
def write_person(self, key, rptOptions):
|
||||||
"""Output birth, death, parentage, marriage and notes information """
|
"""Output birth, death, parentage, marriage and notes information """
|
||||||
|
|
||||||
self.doc.start_paragraph("Entry","%s." % str(key))
|
self.doc.start_paragraph("DDR:Entry","%s." % str(key))
|
||||||
|
|
||||||
person = self.map[key]
|
person = self.map[key]
|
||||||
if rptOptions.addImages == reportOptions.Yes:
|
if rptOptions.addImages == reportOptions.Yes:
|
||||||
@ -246,12 +246,12 @@ class DetDescendantReport(Report.Report):
|
|||||||
self.write_mate(person, rptOptions)
|
self.write_mate(person, rptOptions)
|
||||||
|
|
||||||
if person.getNote() != "" and rptOptions.includeNotes == reportOptions.Yes:
|
if person.getNote() != "" and rptOptions.includeNotes == reportOptions.Yes:
|
||||||
self.doc.start_paragraph("NoteHeader")
|
self.doc.start_paragraph("DDR:NoteHeader")
|
||||||
self.doc.start_bold()
|
self.doc.start_bold()
|
||||||
self.doc.write_text(_("Notes for %s" % name))
|
self.doc.write_text(_("Notes for %s" % name))
|
||||||
self.doc.end_bold()
|
self.doc.end_bold()
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DDR:Entry")
|
||||||
self.doc.write_text(person.getNote())
|
self.doc.write_text(person.getNote())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
mateFirstName = mate.getPrimaryName().getFirstName()
|
mateFirstName = mate.getPrimaryName().getFirstName()
|
||||||
|
|
||||||
if mate:
|
if mate:
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DDR:Entry")
|
||||||
|
|
||||||
if rptOptions.addImages == reportOptions.Yes:
|
if rptOptions.addImages == reportOptions.Yes:
|
||||||
self.insert_images(mate, rptOptions.imageAttrTag)
|
self.insert_images(mate, rptOptions.imageAttrTag)
|
||||||
@ -586,7 +586,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
|
|
||||||
numPhotos= numPhotos + 1
|
numPhotos= numPhotos + 1
|
||||||
if numPhotos == 1:
|
if numPhotos == 1:
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DDR:Entry")
|
||||||
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
||||||
float(vlist[1]), float(vlist[2]))
|
float(vlist[1]), float(vlist[2]))
|
||||||
#self.doc.end_paragraph()
|
#self.doc.end_paragraph()
|
||||||
@ -594,7 +594,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
elif vlist[0] == 'row':
|
elif vlist[0] == 'row':
|
||||||
numPhotos= numPhotos + 1
|
numPhotos= numPhotos + 1
|
||||||
if numPhotos == 1:
|
if numPhotos == 1:
|
||||||
self.doc.start_paragraph("Entry")
|
self.doc.start_paragraph("DDR:Entry")
|
||||||
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
self.doc.add_photo(photo.ref.getPath(), vlist[0], \
|
||||||
float(vlist[1]), float(vlist[2]))
|
float(vlist[1]), float(vlist[2]))
|
||||||
|
|
||||||
@ -629,7 +629,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
if fam.getFather() != None:
|
if fam.getFather() != None:
|
||||||
spouseName= fam.getFather().getPrimaryName().getFirstName()
|
spouseName= fam.getFather().getPrimaryName().getFirstName()
|
||||||
|
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("DDR:Title")
|
||||||
if spouseName != "":
|
if spouseName != "":
|
||||||
name = spouseName + " and " + name
|
name = spouseName + " and " + name
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ class DetDescendantReport(Report.Report):
|
|||||||
for generation in xrange(len(self.genKeys)):
|
for generation in xrange(len(self.genKeys)):
|
||||||
if self.pgbrk and generation > 0:
|
if self.pgbrk and generation > 0:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("DDR:Generation")
|
||||||
t = _("%s Generation") % DetDescendantReport.gen[generation+1]
|
t = _("%s Generation") % DetDescendantReport.gen[generation+1]
|
||||||
self.doc.write_text(t)
|
self.doc.write_text(t)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -683,7 +683,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_header_level(1)
|
para.set_header_level(1)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("DDR:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -691,7 +691,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_header_level(2)
|
para.set_header_level(2)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("Generation",para)
|
default_style.add_style("DDR:Generation",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
|
||||||
@ -700,22 +700,22 @@ def _make_default_style(default_style):
|
|||||||
#para.set_header_level(3)
|
#para.set_header_level(3)
|
||||||
para.set_left_margin(0.0) # in centimeters
|
para.set_left_margin(0.0) # in centimeters
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
default_style.add_style("ChildTitle",para)
|
default_style.add_style("DDR:ChildTitle",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("ChildList",para)
|
default_style.add_style("DDR:ChildList",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("NoteHeader",para)
|
default_style.add_style("DDR:NoteHeader",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
|
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("DDR:Entry",para)
|
||||||
|
|
||||||
table = TextDoc.TableStyle()
|
table = TextDoc.TableStyle()
|
||||||
table.set_width(1000)
|
table.set_width(1000)
|
||||||
|
@ -66,41 +66,41 @@ class FamilyGroup:
|
|||||||
cell.set_bottom_border(1)
|
cell.set_bottom_border(1)
|
||||||
cell.set_right_border(1)
|
cell.set_right_border(1)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
self.doc.add_cell_style('ParentHead',cell)
|
self.doc.add_cell_style('FGR:ParentHead',cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
cell.set_bottom_border(1)
|
cell.set_bottom_border(1)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
self.doc.add_cell_style('TextContents',cell)
|
self.doc.add_cell_style('FGR:TextContents',cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
cell.set_bottom_border(0)
|
cell.set_bottom_border(0)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
self.doc.add_cell_style('TextChild1',cell)
|
self.doc.add_cell_style('FGR:TextChild1',cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
cell.set_bottom_border(1)
|
cell.set_bottom_border(1)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
self.doc.add_cell_style('TextChild2',cell)
|
self.doc.add_cell_style('FGR:TextChild2',cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
cell.set_padding(0.1)
|
cell.set_padding(0.1)
|
||||||
cell.set_bottom_border(1)
|
cell.set_bottom_border(1)
|
||||||
cell.set_right_border(1)
|
cell.set_right_border(1)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
self.doc.add_cell_style('TextContentsEnd',cell)
|
self.doc.add_cell_style('FGR:TextContentsEnd',cell)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
cell.set_padding(0.2)
|
cell.set_padding(0.2)
|
||||||
cell.set_bottom_border(1)
|
cell.set_bottom_border(1)
|
||||||
cell.set_right_border(1)
|
cell.set_right_border(1)
|
||||||
cell.set_left_border(1)
|
cell.set_left_border(1)
|
||||||
self.doc.add_cell_style('ChildName',cell)
|
self.doc.add_cell_style('FGR:ChildName',cell)
|
||||||
|
|
||||||
table = TextDoc.TableStyle()
|
table = TextDoc.TableStyle()
|
||||||
table.set_width(100)
|
table.set_width(100)
|
||||||
@ -108,7 +108,7 @@ class FamilyGroup:
|
|||||||
table.set_column_width(0,20)
|
table.set_column_width(0,20)
|
||||||
table.set_column_width(1,40)
|
table.set_column_width(1,40)
|
||||||
table.set_column_width(2,40)
|
table.set_column_width(2,40)
|
||||||
self.doc.add_table_style('ParentTable',table)
|
self.doc.add_table_style('FGR:ParentTable',table)
|
||||||
|
|
||||||
table = TextDoc.TableStyle()
|
table = TextDoc.TableStyle()
|
||||||
table.set_width(100)
|
table.set_width(100)
|
||||||
@ -117,7 +117,7 @@ class FamilyGroup:
|
|||||||
table.set_column_width(1,18)
|
table.set_column_width(1,18)
|
||||||
table.set_column_width(2,35)
|
table.set_column_width(2,35)
|
||||||
table.set_column_width(3,40)
|
table.set_column_width(3,40)
|
||||||
self.doc.add_table_style('ChildTable',table)
|
self.doc.add_table_style('FGR:ChildTable',table)
|
||||||
|
|
||||||
def end(self):
|
def end(self):
|
||||||
if self.standalone:
|
if self.standalone:
|
||||||
@ -133,10 +133,10 @@ class FamilyGroup:
|
|||||||
else:
|
else:
|
||||||
id = _("Wife")
|
id = _("Wife")
|
||||||
|
|
||||||
self.doc.start_table(id,'ParentTable')
|
self.doc.start_table(id,'FGR:ParentTable')
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell('ParentHead',3)
|
self.doc.start_cell('FGR:ParentHead',3)
|
||||||
self.doc.start_paragraph('ParentName')
|
self.doc.start_paragraph('FGR:ParentName')
|
||||||
self.doc.write_text(id + ': ')
|
self.doc.write_text(id + ': ')
|
||||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -147,36 +147,36 @@ class FamilyGroup:
|
|||||||
death = person.getDeath()
|
death = person.getDeath()
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(_("Birth"))
|
self.doc.write_text(_("Birth"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(birth.getDate())
|
self.doc.write_text(birth.getDate())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContentsEnd")
|
self.doc.start_cell("FGR:TextContentsEnd")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(birth.getPlaceName())
|
self.doc.write_text(birth.getPlaceName())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(_("Death"))
|
self.doc.write_text(_("Death"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(death.getDate())
|
self.doc.write_text(death.getDate())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContentsEnd")
|
self.doc.start_cell("FGR:TextContentsEnd")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(death.getPlaceName())
|
self.doc.write_text(death.getPlaceName())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
@ -193,26 +193,26 @@ class FamilyGroup:
|
|||||||
mother_name = family.getMother().getPrimaryName().getRegularName()
|
mother_name = family.getMother().getPrimaryName().getRegularName()
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(_("Father"))
|
self.doc.write_text(_("Father"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContentsEnd",2)
|
self.doc.start_cell("FGR:TextContentsEnd",2)
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(father_name)
|
self.doc.write_text(father_name)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell("TextContents")
|
self.doc.start_cell("FGR:TextContents")
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(_("Mother"))
|
self.doc.write_text(_("Mother"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell("TextContentsEnd",2)
|
self.doc.start_cell("FGR:TextContentsEnd",2)
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(mother_name)
|
self.doc.write_text(mother_name)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
@ -229,21 +229,21 @@ class FamilyGroup:
|
|||||||
place = ""
|
place = ""
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell(text)
|
self.doc.start_cell(text)
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('TextContents')
|
self.doc.start_cell('FGR:TextContents')
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(name)
|
self.doc.write_text(name)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('TextContents')
|
self.doc.start_cell('FGR:TextContents')
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(date)
|
self.doc.write_text(date)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('TextContentsEnd')
|
self.doc.start_cell('FGR:TextContentsEnd')
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(place)
|
self.doc.write_text(place)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
@ -252,27 +252,27 @@ class FamilyGroup:
|
|||||||
def dump_child(self,index,person):
|
def dump_child(self,index,person):
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell('TextChild1')
|
self.doc.start_cell('FGR:TextChild1')
|
||||||
self.doc.start_paragraph('ChildText')
|
self.doc.start_paragraph('FGR:ChildText')
|
||||||
if person.getGender() == RelLib.Person.male:
|
if person.getGender() == RelLib.Person.male:
|
||||||
self.doc.write_text("%dM" % index)
|
self.doc.write_text("%dM" % index)
|
||||||
else:
|
else:
|
||||||
self.doc.write_text("%dF" % index)
|
self.doc.write_text("%dF" % index)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('ChildName',3)
|
self.doc.start_cell('FGR:ChildName',3)
|
||||||
self.doc.start_paragraph('ChildText')
|
self.doc.start_paragraph('FGR:ChildText')
|
||||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
families = len(person.getFamilyList())
|
families = len(person.getFamilyList())
|
||||||
self.dump_child_event('TextChild1','Birth',person.getBirth())
|
self.dump_child_event('FGR:TextChild1','Birth',person.getBirth())
|
||||||
if families == 0:
|
if families == 0:
|
||||||
self.dump_child_event('TextChild2','Death',person.getDeath())
|
self.dump_child_event('FGR:TextChild2',_('Death'),person.getDeath())
|
||||||
else:
|
else:
|
||||||
self.dump_child_event('TextChild1','Death',person.getDeath())
|
self.dump_child_event('FGR:TextChild1',_('Death'),person.getDeath())
|
||||||
|
|
||||||
index = 1
|
index = 1
|
||||||
for family in person.getFamilyList():
|
for family in person.getFamilyList():
|
||||||
@ -282,26 +282,26 @@ class FamilyGroup:
|
|||||||
else:
|
else:
|
||||||
spouse = family.getFather()
|
spouse = family.getFather()
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell('TextChild1')
|
self.doc.start_cell('FGR:TextChild1')
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('TextContents')
|
self.doc.start_cell('FGR:TextContents')
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(_("Spouse"))
|
self.doc.write_text(_("Spouse"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.start_cell('TextContentsEnd',2)
|
self.doc.start_cell('FGR:TextContentsEnd',2)
|
||||||
self.doc.start_paragraph('Normal')
|
self.doc.start_paragraph('FGR:Normal')
|
||||||
self.doc.write_text(spouse.getPrimaryName().getRegularName())
|
self.doc.write_text(spouse.getPrimaryName().getRegularName())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
if index == families:
|
if index == families:
|
||||||
self.dump_child_event('TextChild2',_("Married"),m)
|
self.dump_child_event('FGR:TextChild2',_("Married"),m)
|
||||||
else:
|
else:
|
||||||
self.dump_child_event('TextChild1',_("Married"),m)
|
self.dump_child_event('FGR:TextChild1',_("Married"),m)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -312,24 +312,24 @@ class FamilyGroup:
|
|||||||
if self.newpage:
|
if self.newpage:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
|
|
||||||
self.doc.start_paragraph('Title')
|
self.doc.start_paragraph('FGR:Title')
|
||||||
self.doc.write_text(_("Family Group Report"))
|
self.doc.write_text(_("Family Group Report"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
if self.family:
|
if self.family:
|
||||||
self.dump_parent(self.family.getFather())
|
self.dump_parent(self.family.getFather())
|
||||||
self.doc.start_paragraph("blank")
|
self.doc.start_paragraph("FGR:blank")
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.dump_parent(self.family.getMother())
|
self.dump_parent(self.family.getMother())
|
||||||
|
|
||||||
length = len(self.family.getChildList())
|
length = len(self.family.getChildList())
|
||||||
if length > 0:
|
if length > 0:
|
||||||
self.doc.start_paragraph("blank")
|
self.doc.start_paragraph("FGR:blank")
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.start_table('Children','ChildTable')
|
self.doc.start_table('FGR:Children','FGR:ChildTable')
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell('ParentHead',4)
|
self.doc.start_cell('FGR:ParentHead',4)
|
||||||
self.doc.start_paragraph('ParentName')
|
self.doc.start_paragraph('FGR:ParentName')
|
||||||
self.doc.write_text(_("Children"))
|
self.doc.write_text(_("Children"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
@ -597,7 +597,7 @@ def _make_default_style(default_style):
|
|||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set_size(4)
|
font.set_size(4)
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
default_style.add_style('blank',para)
|
default_style.add_style('FGR:blank',para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
||||||
@ -606,7 +606,7 @@ def _make_default_style(default_style):
|
|||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_description(_("The style used for the title of the page."))
|
para.set_description(_("The style used for the title of the page."))
|
||||||
default_style.add_style('Title',para)
|
default_style.add_style('FGR:Title',para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set_type_face(TextDoc.FONT_SERIF)
|
font.set_type_face(TextDoc.FONT_SERIF)
|
||||||
@ -615,7 +615,7 @@ def _make_default_style(default_style):
|
|||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style('Normal',para)
|
default_style.add_style('FGR:Normal',para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
||||||
@ -624,7 +624,7 @@ def _make_default_style(default_style):
|
|||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_description(_('The style used for the text related to the children.'))
|
para.set_description(_('The style used for the text related to the children.'))
|
||||||
default_style.add_style('ChildText',para)
|
default_style.add_style('FGR:ChildText',para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
font.set_type_face(TextDoc.FONT_SANS_SERIF)
|
||||||
@ -633,7 +633,7 @@ def _make_default_style(default_style):
|
|||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
para.set_description(_("The style used for the parent's name"))
|
para.set_description(_("The style used for the parent's name"))
|
||||||
default_style.add_style('ParentName',para)
|
default_style.add_style('FGR:ParentName',para)
|
||||||
|
|
||||||
def _build_spouse_map(person):
|
def _build_spouse_map(person):
|
||||||
"""Create a mapping of all spouse names:families to be put
|
"""Create a mapping of all spouse names:families to be put
|
||||||
|
@ -80,7 +80,7 @@ class FtmAncestorReport(Report.Report):
|
|||||||
self.apply_filter(self.start,1)
|
self.apply_filter(self.start,1)
|
||||||
|
|
||||||
name = self.start.getPrimaryName().getRegularName()
|
name = self.start.getPrimaryName().getRegularName()
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("FTA:Title")
|
||||||
title = _("Ancestors of %s") % name
|
title = _("Ancestors of %s") % name
|
||||||
self.doc.write_text(title)
|
self.doc.write_text(title)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -93,14 +93,14 @@ class FtmAncestorReport(Report.Report):
|
|||||||
if old_gen != generation:
|
if old_gen != generation:
|
||||||
if self.pgbrk and generation > 1:
|
if self.pgbrk and generation > 1:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("FTA:Generation")
|
||||||
t = _("Generation No. %d") % generation
|
t = _("Generation No. %d") % generation
|
||||||
self.doc.write_text(t)
|
self.doc.write_text(t)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
old_gen = generation
|
old_gen = generation
|
||||||
|
|
||||||
pri_name = person.getPrimaryName()
|
pri_name = person.getPrimaryName()
|
||||||
self.doc.start_paragraph("Entry","%d." % key)
|
self.doc.start_paragraph("FTA:Entry","%d." % key)
|
||||||
name = pri_name.getRegularName()
|
name = pri_name.getRegularName()
|
||||||
self.doc.start_bold()
|
self.doc.start_bold()
|
||||||
self.doc.write_text(name)
|
self.doc.write_text(name)
|
||||||
@ -198,7 +198,7 @@ class FtmAncestorReport(Report.Report):
|
|||||||
if not keys:
|
if not keys:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.doc.start_paragraph('Generation')
|
self.doc.start_paragraph('FTA:Generation')
|
||||||
self.doc.write_text(_('Endnotes'))
|
self.doc.write_text(_('Endnotes'))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ class FtmAncestorReport(Report.Report):
|
|||||||
srcref = self.sref_map[key]
|
srcref = self.sref_map[key]
|
||||||
base = srcref.getBase()
|
base = srcref.getBase()
|
||||||
|
|
||||||
self.doc.start_paragraph('Endnotes',"%d." % key)
|
self.doc.start_paragraph('FTA:Endnotes',"%d." % key)
|
||||||
self.doc.write_text(base.getTitle())
|
self.doc.write_text(base.getTitle())
|
||||||
|
|
||||||
for item in [ base.getAuthor(), base.getPubInfo(), base.getCallNumber(),
|
for item in [ base.getAuthor(), base.getPubInfo(), base.getCallNumber(),
|
||||||
@ -254,12 +254,12 @@ class FtmAncestorReport(Report.Report):
|
|||||||
note = person.getNote()
|
note = person.getNote()
|
||||||
if not note.strip():
|
if not note.strip():
|
||||||
return
|
return
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTA:SubEntry')
|
||||||
self.doc.write_text(_('Notes for %(person)s:') % {
|
self.doc.write_text(_('Notes for %(person)s:') % {
|
||||||
'person' : person.getPrimaryName().getRegularName()} )
|
'person' : person.getPrimaryName().getRegularName()} )
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
for line in note.split('\n'):
|
for line in note.split('\n'):
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTA:Details')
|
||||||
self.doc.write_text(line.strip())
|
self.doc.write_text(line.strip())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -269,12 +269,12 @@ class FtmAncestorReport(Report.Report):
|
|||||||
ncount = 0
|
ncount = 0
|
||||||
for name in person.getAlternateNames():
|
for name in person.getAlternateNames():
|
||||||
if first:
|
if first:
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTA:SubEntry')
|
||||||
self.doc.write_text(_('More about %(person_name)s:') % {
|
self.doc.write_text(_('More about %(person_name)s:') % {
|
||||||
'person_name' : person.getPrimaryName().getRegularName() })
|
'person_name' : person.getPrimaryName().getRegularName() })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
first = 0
|
first = 0
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTA:Details')
|
||||||
self.doc.write_text(_('Name %(count)d: %(name)s%(endnotes)s') % {
|
self.doc.write_text(_('Name %(count)d: %(name)s%(endnotes)s') % {
|
||||||
'count' : ncount, 'name' : name.getRegularName(),
|
'count' : ncount, 'name' : name.getRegularName(),
|
||||||
'endnotes' : self.endnotes(name),
|
'endnotes' : self.endnotes(name),
|
||||||
@ -289,14 +289,14 @@ class FtmAncestorReport(Report.Report):
|
|||||||
if not date and not place:
|
if not date and not place:
|
||||||
continue
|
continue
|
||||||
if first:
|
if first:
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTA:SubEntry')
|
||||||
name = person.getPrimaryName().getRegularName()
|
name = person.getPrimaryName().getRegularName()
|
||||||
self.doc.write_text(_('More about %(person_name)s:') % {
|
self.doc.write_text(_('More about %(person_name)s:') % {
|
||||||
'person_name' : name })
|
'person_name' : name })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
first = 0
|
first = 0
|
||||||
|
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTA:Details')
|
||||||
if date and place:
|
if date and place:
|
||||||
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
||||||
'event_name' : event.getName(),
|
'event_name' : event.getName(),
|
||||||
@ -731,7 +731,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("FTA:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -741,27 +741,27 @@ def _make_default_style(default_style):
|
|||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set_description(_('The style used for the generation header.'))
|
para.set_description(_('The style used for the generation header.'))
|
||||||
default_style.add_style("Generation",para)
|
default_style.add_style("FTA:Generation",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("FTA:Entry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.05)
|
para.set(lmargin=1.0,pad=0.05)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Details",para)
|
default_style.add_style("FTA:Details",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.25)
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("SubEntry",para)
|
default_style.add_style("FTA:SubEntry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(pad=0.05)
|
para.set(pad=0.05)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Endnotes",para)
|
default_style.add_style("FTA:Endnotes",para)
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -77,10 +77,10 @@ class FtmDescendantReport(Report.Report):
|
|||||||
tbl.set_column_width(0,10)
|
tbl.set_column_width(0,10)
|
||||||
tbl.set_column_width(1,5)
|
tbl.set_column_width(1,5)
|
||||||
tbl.set_column_width(2,85)
|
tbl.set_column_width(2,85)
|
||||||
self.doc.add_table_style('ChildTable',tbl)
|
self.doc.add_table_style('FTD:ChildTable',tbl)
|
||||||
|
|
||||||
cell = TextDoc.TableCellStyle()
|
cell = TextDoc.TableCellStyle()
|
||||||
self.doc.add_cell_style('Normal',cell)
|
self.doc.add_cell_style('FTD:Normal',cell)
|
||||||
|
|
||||||
def apply_filter(self,person,index,generation=1):
|
def apply_filter(self,person,index,generation=1):
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ class FtmDescendantReport(Report.Report):
|
|||||||
self.apply_filter(self.start,1)
|
self.apply_filter(self.start,1)
|
||||||
|
|
||||||
name = self.start.getPrimaryName().getRegularName()
|
name = self.start.getPrimaryName().getRegularName()
|
||||||
self.doc.start_paragraph("Title")
|
self.doc.start_paragraph("FTD:Title")
|
||||||
title = _("Descendants of %s") % name
|
title = _("Descendants of %s") % name
|
||||||
self.doc.write_text(title)
|
self.doc.write_text(title)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -119,7 +119,7 @@ class FtmDescendantReport(Report.Report):
|
|||||||
for generation in generations:
|
for generation in generations:
|
||||||
if self.pgbrk and generation > 1:
|
if self.pgbrk and generation > 1:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
self.doc.start_paragraph("Generation")
|
self.doc.start_paragraph("FTD:Generation")
|
||||||
t = _("Generation No. %d") % generation
|
t = _("Generation No. %d") % generation
|
||||||
self.doc.write_text(t)
|
self.doc.write_text(t)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -130,7 +130,7 @@ class FtmDescendantReport(Report.Report):
|
|||||||
person = self.anc_map[key]
|
person = self.anc_map[key]
|
||||||
|
|
||||||
pri_name = person.getPrimaryName()
|
pri_name = person.getPrimaryName()
|
||||||
self.doc.start_paragraph("Entry","%d." % key)
|
self.doc.start_paragraph("FTD:Entry","%d." % key)
|
||||||
name = pri_name.getRegularName()
|
name = pri_name.getRegularName()
|
||||||
self.doc.start_bold()
|
self.doc.start_bold()
|
||||||
self.doc.write_text(name)
|
self.doc.write_text(name)
|
||||||
@ -231,7 +231,7 @@ class FtmDescendantReport(Report.Report):
|
|||||||
if not keys:
|
if not keys:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.doc.start_paragraph('Generation')
|
self.doc.start_paragraph('FTD:Generation')
|
||||||
self.doc.write_text(_('Endnotes'))
|
self.doc.write_text(_('Endnotes'))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ class FtmDescendantReport(Report.Report):
|
|||||||
srcref = self.sref_map[key]
|
srcref = self.sref_map[key]
|
||||||
base = srcref.getBase()
|
base = srcref.getBase()
|
||||||
|
|
||||||
self.doc.start_paragraph('Endnotes',"%d." % key)
|
self.doc.start_paragraph('FTD:Endnotes',"%d." % key)
|
||||||
self.doc.write_text(base.getTitle())
|
self.doc.write_text(base.getTitle())
|
||||||
|
|
||||||
for item in [ base.getAuthor(), base.getPubInfo(), base.getCallNumber(),
|
for item in [ base.getAuthor(), base.getPubInfo(), base.getCallNumber(),
|
||||||
@ -287,12 +287,12 @@ class FtmDescendantReport(Report.Report):
|
|||||||
note = person.getNote()
|
note = person.getNote()
|
||||||
if not note.strip():
|
if not note.strip():
|
||||||
return
|
return
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTD:SubEntry')
|
||||||
self.doc.write_text(_('Notes for %(person)s:') % {
|
self.doc.write_text(_('Notes for %(person)s:') % {
|
||||||
'person' : person.getPrimaryName().getRegularName()} )
|
'person' : person.getPrimaryName().getRegularName()} )
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
for line in note.split('\n'):
|
for line in note.split('\n'):
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
self.doc.write_text(line.strip())
|
self.doc.write_text(line.strip())
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -302,12 +302,12 @@ class FtmDescendantReport(Report.Report):
|
|||||||
ncount = 1
|
ncount = 1
|
||||||
for name in person.getAlternateNames():
|
for name in person.getAlternateNames():
|
||||||
if first:
|
if first:
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTD:SubEntry')
|
||||||
self.doc.write_text(_('More about %(person_name)s:') % {
|
self.doc.write_text(_('More about %(person_name)s:') % {
|
||||||
'person_name' : person.getPrimaryName().getRegularName() })
|
'person_name' : person.getPrimaryName().getRegularName() })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
first = 0
|
first = 0
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
self.doc.write_text(_('Name %(count)d: %(name)s%(endnotes)s') % {
|
self.doc.write_text(_('Name %(count)d: %(name)s%(endnotes)s') % {
|
||||||
'count' : ncount, 'name' : name.getRegularName(),
|
'count' : ncount, 'name' : name.getRegularName(),
|
||||||
'endnotes' : self.endnotes(name),
|
'endnotes' : self.endnotes(name),
|
||||||
@ -322,13 +322,13 @@ class FtmDescendantReport(Report.Report):
|
|||||||
if not date and not place:
|
if not date and not place:
|
||||||
continue
|
continue
|
||||||
if first:
|
if first:
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTD:SubEntry')
|
||||||
name = person.getPrimaryName().getRegularName()
|
name = person.getPrimaryName().getRegularName()
|
||||||
self.doc.write_text(_('More about %(person_name)s:') % { 'person_name' : name })
|
self.doc.write_text(_('More about %(person_name)s:') % { 'person_name' : name })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
first = 0
|
first = 0
|
||||||
|
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
if date and place:
|
if date and place:
|
||||||
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
||||||
'event_name' : event.getName(),
|
'event_name' : event.getName(),
|
||||||
@ -366,12 +366,12 @@ class FtmDescendantReport(Report.Report):
|
|||||||
if not date and not place:
|
if not date and not place:
|
||||||
continue
|
continue
|
||||||
if first:
|
if first:
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTD:SubEntry')
|
||||||
self.doc.write_text(_('More about %(husband)s and %(wife)s:') % { 'husband' : husband, 'wife' : wife })
|
self.doc.write_text(_('More about %(husband)s and %(wife)s:') % { 'husband' : husband, 'wife' : wife })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
first = 0
|
first = 0
|
||||||
|
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
if date and place:
|
if date and place:
|
||||||
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
self.doc.write_text(_('%(event_name)s: %(date)s, %(place)s%(endnotes)s') % {
|
||||||
'event_name' : event.getName(),
|
'event_name' : event.getName(),
|
||||||
@ -414,30 +414,30 @@ class FtmDescendantReport(Report.Report):
|
|||||||
|
|
||||||
if first:
|
if first:
|
||||||
first = 0
|
first = 0
|
||||||
self.doc.start_paragraph('SubEntry')
|
self.doc.start_paragraph('FTD:SubEntry')
|
||||||
if spouse:
|
if spouse:
|
||||||
self.doc.write_text(_('Children of %(person_name)s and %(spouse_name)s are:') % {
|
self.doc.write_text(_('Children of %(person_name)s and %(spouse_name)s are:') % {
|
||||||
'person_name' : name, 'spouse_name' : spouse.getPrimaryName().getRegularName() })
|
'person_name' : name, 'spouse_name' : spouse.getPrimaryName().getRegularName() })
|
||||||
else:
|
else:
|
||||||
self.doc.write_text(_('Children of %(person_name)s are:') % { 'person_name' : name })
|
self.doc.write_text(_('Children of %(person_name)s are:') % { 'person_name' : name })
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.start_table(family.getId(),'ChildTable')
|
self.doc.start_table(family.getId(),'FTD:ChildTable')
|
||||||
|
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
self.doc.start_cell('Normal')
|
self.doc.start_cell('FTD:Normal')
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
self.doc.write_text("%d." % index)
|
self.doc.write_text("%d." % index)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
|
|
||||||
self.doc.start_cell('Normal')
|
self.doc.start_cell('FTD:Normal')
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
self.doc.write_text("%s." % string.lower(Utils.roman(child_index)))
|
self.doc.write_text("%s." % string.lower(Utils.roman(child_index)))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
|
|
||||||
self.doc.start_cell('Normal')
|
self.doc.start_cell('FTD:Normal')
|
||||||
self.doc.start_paragraph('Details')
|
self.doc.start_paragraph('FTD:Details')
|
||||||
|
|
||||||
death = child.getDeath()
|
death = child.getDeath()
|
||||||
dplace = death.getPlaceName()
|
dplace = death.getPlaceName()
|
||||||
@ -1140,7 +1140,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
default_style.add_style("Title",para)
|
default_style.add_style("FTD:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -1150,27 +1150,27 @@ def _make_default_style(default_style):
|
|||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set_description(_('The style used for the generation header.'))
|
para.set_description(_('The style used for the generation header.'))
|
||||||
default_style.add_style("Generation",para)
|
default_style.add_style("FTD:Generation",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Entry",para)
|
default_style.add_style("FTD:Entry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.05)
|
para.set(lmargin=1.0,pad=0.05)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Details",para)
|
default_style.add_style("FTD:Details",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(lmargin=1.0,pad=0.25)
|
para.set(lmargin=1.0,pad=0.25)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("SubEntry",para)
|
default_style.add_style("FTD:SubEntry",para)
|
||||||
|
|
||||||
para = TextDoc.ParagraphStyle()
|
para = TextDoc.ParagraphStyle()
|
||||||
para.set(pad=0.05)
|
para.set(pad=0.05)
|
||||||
para.set_description(_('The basic style used for the text display.'))
|
para.set_description(_('The basic style used for the text display.'))
|
||||||
default_style.add_style("Endnotes",para)
|
default_style.add_style("FTD:Endnotes",para)
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -73,11 +73,11 @@ class SimpleBookTitle(Report.Report):
|
|||||||
if self.newpage:
|
if self.newpage:
|
||||||
self.doc.page_break()
|
self.doc.page_break()
|
||||||
|
|
||||||
self.doc.start_paragraph('SBT-Title')
|
self.doc.start_paragraph('SBT:Title')
|
||||||
self.doc.write_text(self.title_string)
|
self.doc.write_text(self.title_string)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
self.doc.start_paragraph('SBT-Subtitle')
|
self.doc.start_paragraph('SBT:Subtitle')
|
||||||
self.doc.write_text(self.copyright_string)
|
self.doc.write_text(self.copyright_string)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ def _make_default_style(default_style):
|
|||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_description(_('The style used for the title of the page.'))
|
para.set_description(_('The style used for the title of the page.'))
|
||||||
default_style.add_style("SBT-Title",para)
|
default_style.add_style("SBT:Title",para)
|
||||||
|
|
||||||
font = TextDoc.FontStyle()
|
font = TextDoc.FontStyle()
|
||||||
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
||||||
@ -105,7 +105,7 @@ def _make_default_style(default_style):
|
|||||||
para.set(pad=0.5)
|
para.set(pad=0.5)
|
||||||
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
||||||
para.set_description(_('The style used for the subtitle.'))
|
para.set_description(_('The style used for the subtitle.'))
|
||||||
default_style.add_style("SBT-Subtitle",para)
|
default_style.add_style("SBT:Subtitle",para)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -194,7 +194,7 @@ class SimpleBookTitleDialog(Report.BareReportDialog):
|
|||||||
self.copyright_entry = gtk.Entry()
|
self.copyright_entry = gtk.Entry()
|
||||||
|
|
||||||
self.add_frame_option(_('Contents'),_('Title String'),self.title_entry)
|
self.add_frame_option(_('Contents'),_('Title String'),self.title_entry)
|
||||||
self.add_frame_option(_('Contents'),_('Copyright String'),self.copyright_entry)
|
self.add_frame_option(_('Contents'),_('Subtitle String'),self.copyright_entry)
|
||||||
|
|
||||||
def parse_report_options_frame(self):
|
def parse_report_options_frame(self):
|
||||||
"""Parse the report options frame of the dialog. Save the user selected choices for later use."""
|
"""Parse the report options frame of the dialog. Save the user selected choices for later use."""
|
||||||
|
Loading…
Reference in New Issue
Block a user