From ac1f811723a9db4533a92882bc418089e2c19963 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 28 Aug 2005 20:38:46 +0000 Subject: [PATCH] * src/plugins/AncestorChart2.py: add support for %n style of keyword substitution svn: r5135 --- gramps2/ChangeLog | 4 ++++ gramps2/src/plugins/AncestorChart2.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 4942a4967..e32727db4 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2005-08-28 Don Allingham + * src/plugins/AncestorChart2.py: add support for %n style + of keyword substitution + 2005-08-27 Don Allingham * src/data/Makefile.am: install document.png * src/plugins/Makefile.am: install DescendChart.py diff --git a/gramps2/src/plugins/AncestorChart2.py b/gramps2/src/plugins/AncestorChart2.py index 91deed4e4..cbfed2a0e 100644 --- a/gramps2/src/plugins/AncestorChart2.py +++ b/gramps2/src/plugins/AncestorChart2.py @@ -226,13 +226,13 @@ class AncestorChart(Report.Report): self.text[index] = [] + em = self.doc.string_width(self.font,"m") + subst = SubstKeywords(self.database,person_handle) - - for line in self.display: - self.text[index].append(subst.replace(line)) + self.text[index] = subst.replace_and_clean(self.display) for line in self.text[index]: - this_box_width = self.doc.string_width(self.font,line) + this_box_width = self.doc.string_width(self.font,line) + 2*em self.box_width = max(self.box_width,this_box_width) self.lines = max(self.lines,len(self.text[index]))