2004-12-13 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py (generation): Avoid empty sections. svn: r3801
This commit is contained in:
parent
8179685348
commit
4f64dd0fea
@ -1,3 +1,6 @@
|
|||||||
|
2004-12-13 Tim Waugh <twaugh@redhat.com>
|
||||||
|
* src/plugins/Ancestors.py (generation): Avoid empty sections.
|
||||||
|
|
||||||
2004-12-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
2004-12-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/PedView.py (get_distance): Remove function; use similar
|
* src/PedView.py (get_distance): Remove function; use similar
|
||||||
from Relationship module.
|
from Relationship module.
|
||||||
|
@ -227,6 +227,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
for family_handle in pfamily_handles:
|
for family_handle in pfamily_handles:
|
||||||
people.extend (self.family (family_handle, already_described))
|
people.extend (self.family (family_handle, already_described))
|
||||||
|
|
||||||
|
paternal_known = (len (people) > 0)
|
||||||
if thisgen > 2 and len (mfamily_handles):
|
if thisgen > 2 and len (mfamily_handles):
|
||||||
for self.gp in [self.database.get_family_from_handle(mfamily_handles[0]).get_father_handle (),
|
for self.gp in [self.database.get_family_from_handle(mfamily_handles[0]).get_father_handle (),
|
||||||
self.database.get_family_from_handle(mfamily_handles[0]).get_mother_handle ()]:
|
self.database.get_family_from_handle(mfamily_handles[0]).get_mother_handle ()]:
|
||||||
@ -248,7 +249,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 ("AR-Heading")
|
|
||||||
family_handles = pfamily_handles
|
family_handles = pfamily_handles
|
||||||
family_handles.extend (mfamily_handles)
|
family_handles.extend (mfamily_handles)
|
||||||
for self.gp in [self.database.get_family_from_handle(family_handles[0]).get_father_handle (),
|
for self.gp in [self.database.get_family_from_handle(family_handles[0]).get_father_handle (),
|
||||||
@ -256,19 +257,22 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
if self.gp:
|
if self.gp:
|
||||||
break
|
break
|
||||||
|
|
||||||
relstring = self.relationship.get_grandparents_string (self.start,
|
if paternal_known:
|
||||||
self.database.get_person_from_handle(self.gp))[0]
|
self.doc.start_paragraph ("AR-Heading")
|
||||||
if thisgen == 2:
|
relstring = self.relationship.get_grandparents_string (self.start,
|
||||||
heading = _("%(name)s's %(parents)s") % \
|
self.database.get_person_from_handle(self.gp))[0]
|
||||||
{ 'name': self.first_name_or_nick (self.start),
|
if thisgen == 2:
|
||||||
'parents': relstring }
|
heading = _("%(name)s's %(parents)s") % \
|
||||||
else:
|
{ 'name': self.first_name_or_nick (self.start),
|
||||||
heading = _("%(name)s's paternal %(grandparents)s") % \
|
'parents': relstring }
|
||||||
{ 'name': self.first_name_or_nick (self.start),
|
else:
|
||||||
'grandparents': relstring }
|
heading = _("%(name)s's paternal %(grandparents)s") % \
|
||||||
|
{ 'name': self.first_name_or_nick (self.start),
|
||||||
|
'grandparents': relstring }
|
||||||
|
|
||||||
|
self.doc.write_text (heading)
|
||||||
|
self.doc.end_paragraph ()
|
||||||
|
|
||||||
self.doc.write_text (heading)
|
|
||||||
self.doc.end_paragraph ()
|
|
||||||
self.write_paragraphs (people)
|
self.write_paragraphs (people)
|
||||||
|
|
||||||
next_pfamily_handles = []
|
next_pfamily_handles = []
|
||||||
|
Loading…
Reference in New Issue
Block a user