From 5616ef7266878d68d30514dc6e3adfeba01d6a2e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 30 Jun 2003 14:56:32 +0000 Subject: [PATCH] 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)'. svn: r1806 --- gramps2/ChangeLog | 5 +++++ gramps2/src/plugins/Ancestors.py | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8ed8f35fb..cd83185c2 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/plugins/Ancestors.py b/gramps2/src/plugins/Ancestors.py index 8839d1646..4a241ae41 100644 --- a/gramps2/src/plugins/Ancestors.py +++ b/gramps2/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()