diff --git a/ChangeLog b/ChangeLog index b0cc1d50d..67dce3f4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-10-09 Don Allingham + * src/Editors/_EditPerson.py: add person's name to title + * src/RelLib/_Name.py: add empty check + 2006-10-08 Brian Matherly * src/plugins/DetAncestralReport.py: fix DAR-Endnotes indent * src/plugins/DetDescendantReport.py: fix DDR-Endnotes indent diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index 4a367420d..3f320cf3e 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -58,6 +58,7 @@ import Utils import Mime import RelLib import GrampsWidgets +import NameDisplay from GrampsDb import set_birth_death_index @@ -117,8 +118,14 @@ class EditPerson(EditPrimary): self.load_obj = None self.top = gtk.glade.XML(const.person_glade, "edit_person", "gramps") - self.set_window(self.top.get_widget("edit_person"), None, - _('Edit Person')) + + if self.pname.is_empty(): + title = _('Edit Person') + else: + name = NameDisplay.displayer.display_name(self.pname) + title = _('Edit Person') + ' (%s)' % name + + self.set_window(self.top.get_widget("edit_person"), None, title) self.obj_photo = self.top.get_widget("personPix") self.eventbox = self.top.get_widget("eventbox1") diff --git a/src/RelLib/_Name.py b/src/RelLib/_Name.py index f5ac85313..b36ef4d29 100644 --- a/src/RelLib/_Name.py +++ b/src/RelLib/_Name.py @@ -109,6 +109,11 @@ class Name(SecondaryObject,PrivacyBase,SourceBase,NoteBase,DateBase): self.type.serialize(),self.prefix,self.patronymic, self.group_as,self.sort_as,self.display_as,self.call) + def is_empty(self): + return (self.first_name == u"" and self.surname == u"" and + self.suffix == u"" and self.title == u"" and + self.prefix == u"" and self.patronymic == u"") + def unserialize(self,data): (privacy,source_list,note,date, self.first_name,self.surname,self.suffix,self.title,