From 69eb302f86cd7275f12a35e5863c5afa49d6cf16 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 30 Apr 2003 03:33:20 +0000 Subject: [PATCH] Don't print b. and d. if not used svn: r1481 --- gramps2/src/FamilyView.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index 61fcb3e1f..9af7302da 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -301,9 +301,17 @@ class FamilyView: self.clear() return - n = "%s\n\tb. %s\n\td. %s " % (GrampsCfg.nameof(self.person), - self.person.getBirth().getDate(), - self.person.getDeath().getDate()) + bd = self.person.getBirth().getDate() + dd = self.person.getDeath().getDate() + + if bd and dd: + n = "%s\n\tb. %s\n\td. %s " % (GrampsCfg.nameof(self.person),bd,dd) + elif bd: + n = "%s\n\tb. %s" % (GrampsCfg.nameof(self.person),bd) + elif dd: + n = "%s\n\td. %s" % (GrampsCfg.nameof(self.person),dd) + else: + n = GrampsCfg.nameof(self.person) self.ap_model.clear() self.ap_data.get_selection().set_mode(gtk.SELECTION_NONE)