* src/plugins/FanChart.py: Fix name display for gen 6 and 7

svn: r7408
This commit is contained in:
Brian Matherly 2006-10-16 03:15:58 +00:00
parent 5af5a15bcf
commit 5ead919447
2 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,6 @@
2006-10-15 Brian Matherly <brian@gramps-project.org>
* src/plugins/FanChart.py: Fix name display for gen 6 and 7
2006-10-11 Alex Roitman <shura@gramps-project.org> 2006-10-11 Alex Roitman <shura@gramps-project.org>
* RELEASE: version 2.2.0rc1 is released. * RELEASE: version 2.2.0rc1 is released.
* configure.in: Bump up the version number. * configure.in: Bump up the version number.

View File

@ -243,21 +243,34 @@ class FanChart(Report):
val = "+ %s" % (str(d)) val = "+ %s" % (str(d))
else: else:
val = "" val = ""
if generation == 7: if generation == 7:
if self.full_circle: if (pn.get_first_name() != "") and (pn.get_surname() != ""):
return [ pn.get_first_name() + " " + pn.get_surname(), val ] name = pn.get_first_name() + " " + pn.get_surname()
elif self.half_circle:
return [ pn.get_first_name() + " " + pn.get_surname(), val ]
else: 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: elif generation == 6:
if self.full_circle: if self.full_circle:
return [ pn.get_first_name(), pn.get_surname(), val ] return [ pn.get_first_name(), pn.get_surname(), val ]
elif self.half_circle: elif self.half_circle:
return [ pn.get_first_name(), pn.get_surname(), val ] return [ pn.get_first_name(), pn.get_surname(), val ]
else: 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: else:
return [ pn.get_first_name(), pn.get_surname(), val ] return [ pn.get_first_name(), pn.get_surname(), val ]