2003-06-30 Tim Waugh <twaugh@redhat.com>

* src/plugins/Ancestors.py (generation): Report on the correct
        number of generations (was out by one).  Fixed text style for
        '(no photo)'.


svn: r1806
This commit is contained in:
Tim Waugh 2003-06-30 14:56:32 +00:00
parent 4d9840e203
commit 5616ef7266
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-06-30 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py (generation): Report on the correct
number of generations (was out by one). Fixed text style for
'(no photo)'.
2003-06-29 Don Allingham <dallingham@users.sourceforge.net>
* src/plugins/FtmStyleDescendants.py: handle missing "endnotes"
* src/DisplayTrace.py: identify more linux versions

View File

@ -192,7 +192,7 @@ class AncestorsReport (Report.Report):
def generation (self, generations, families, already_described,
thisgen = 2):
if generations > 0 and len (families):
if generations > 1 and len (families):
people = []
for family in families:
people.extend (self.family (family, already_described))
@ -292,7 +292,9 @@ class AncestorsReport (Report.Report):
if len (photos) == 0:
ret.append ((self.doc.start_cell, ["NoPhoto"]))
ret.append ((self.doc.start_paragraph, ["NoPhotoText"]))
ret.append ((self.doc.write_text, ["(no photo)"]))
ret.append ((self.doc.end_paragraph, []))
ret.append ((self.doc.end_cell, []))
else:
ret.append ((self.doc.start_cell, ["Photo"]))
@ -630,6 +632,10 @@ def _make_default_style(self):
para.set_description(_('The basic style used for the text display.'))
self.default_style.add_style("Entry",para)
para = TextDoc.ParagraphStyle ()
para.set_description(_('Text style for missing photo.'))
self.default_style.add_style("NoPhotoText", para)
details_font = TextDoc.FontStyle()
details_font.set(face=TextDoc.FONT_SANS_SERIF,size=8,italic=1)
para = TextDoc.ParagraphStyle()