From df630131cd6dc2b2fbb1508e9b1a45c915b98ac4 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Thu, 13 Jun 2013 21:34:08 +0000 Subject: [PATCH] 6797: Alternate Names in Person Details Gramplet (patch by Heinz Brinker) svn: r22503 --- src/plugins/gramplet/PersonDetails.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/plugins/gramplet/PersonDetails.py b/src/plugins/gramplet/PersonDetails.py index c07e5bcf9..d84e9d8c9 100644 --- a/src/plugins/gramplet/PersonDetails.py +++ b/src/plugins/gramplet/PersonDetails.py @@ -1,6 +1,7 @@ # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Nick Hall +# Copyright (C) 2013 Heinz Brinker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -111,8 +112,8 @@ class PersonDetails(Gramplet): """ self.load_person_image(active_person) self.name.set_text(name_displayer.display(active_person)) - self.clear_table() + self.display_alternate_names(active_person) self.display_parents(active_person) self.display_separator() self.display_type(active_person, EventType(EventType.BIRTH)) @@ -144,6 +145,21 @@ class PersonDetails(Gramplet): self.table.resize(rows, 2) self.table.attach(label, 0, 1, rows, rows + 1, xoptions=gtk.FILL) + def display_alternate_names(self, active_person): + """ + Display other names of the person + """ + try: + nlist = active_person.get_alternate_names() + if len(nlist) > 0: + for altname in nlist: + name_type = str( altname.get_type() ) + text = name_displayer.display_name(altname) + self.add_row(name_type, text) + self.display_separator() + except: + pass + def display_parents(self, active_person): """ Display the parents of the active person.