6797: Alternate Names in Person Details Gramplet (patch by Heinz Brinker)

svn: r22505
This commit is contained in:
Paul Franklin 2013-06-13 21:35:05 +00:00
parent 3208db231d
commit 5c71b46283

View File

@ -1,6 +1,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2011 Nick Hall
# Copyright (C) 2013 Heinz Brinker <heinzbrinker@yahoo.de>
#
# 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
@ -112,8 +113,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))
@ -145,6 +146,21 @@ class PersonDetails(Gramplet):
self.table.resize(rows, 2)
self.table.attach(label, 0, 1, rows, rows + 1, xoptions=Gtk.AttachOptions.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.