From 84ab0a12f1a9511f7ab3435164461742d9d46662 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Mon, 16 Oct 2006 03:15:58 +0000 Subject: [PATCH] * src/plugins/FanChart.py: Fix name display for gen 6 and 7 svn: r7408 --- gramps2/ChangeLog | 3 +++ gramps2/src/plugins/FanChart.py | 27 ++++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ae562943a..7d31a2a4c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-10-15 Brian Matherly + * src/plugins/FanChart.py: Fix name display for gen 6 and 7 + 2006-10-11 Alex Roitman * RELEASE: version 2.2.0rc1 is released. * configure.in: Bump up the version number. diff --git a/gramps2/src/plugins/FanChart.py b/gramps2/src/plugins/FanChart.py index 47a0dbb60..a4c442ef4 100644 --- a/gramps2/src/plugins/FanChart.py +++ b/gramps2/src/plugins/FanChart.py @@ -243,21 +243,34 @@ class FanChart(Report): val = "+ %s" % (str(d)) else: val = "" - + if generation == 7: - if self.full_circle: - return [ pn.get_first_name() + " " + pn.get_surname(), val ] - elif self.half_circle: - return [ pn.get_first_name() + " " + pn.get_surname(), val ] + if (pn.get_first_name() != "") and (pn.get_surname() != ""): + name = pn.get_first_name() + " " + pn.get_surname() else: - return [ pn.get_first_name() + " " + pn.get_surname() + ", " + val ] + name = pn.get_first_name() + pn.get_surname() + + if self.full_circle: + return [ name, val ] + elif self.half_circle: + return [ name, val ] + else: + if (name != "") and (val != ""): + string = name + ", " + val + else: + string = name + val + return [string] elif generation == 6: if self.full_circle: return [ pn.get_first_name(), pn.get_surname(), val ] elif self.half_circle: return [ pn.get_first_name(), pn.get_surname(), val ] else: - return [ pn.get_first_name() + " " + pn.get_surname(), val ] + if (pn.get_first_name() != "") and (pn.get_surname() != ""): + name = pn.get_first_name() + " " + pn.get_surname() + else: + name = pn.get_first_name() + pn.get_surname() + return [ name, val ] else: return [ pn.get_first_name(), pn.get_surname(), val ]