diff --git a/ChangeLog b/ChangeLog index 8ed8f35fb..cd83185c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-30 Tim Waugh + * 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 * src/plugins/FtmStyleDescendants.py: handle missing "endnotes" * src/DisplayTrace.py: identify more linux versions diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index 8839d1646..4a241ae41 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -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()