From a7778ace750421aae7dbd2acf1da87b84c3db6b0 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Wed, 8 Jun 2005 21:12:32 +0000 Subject: [PATCH] * src/EditPerson.py: Make gender guessing work again svn: r4812 --- ChangeLog | 3 +++ src/EditPerson.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e8d63195d..bde3e9d35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2005-06-08 Martin Hawlisch + * src/EditPerson.py: Make gender guessing work again + 2005-06-08 Alex Roitman * src/gramps_main.py (init_interface): Set proper color for new icons. * src/gramps.glade (gramps): Label new buttons, left-align labels. diff --git a/src/EditPerson.py b/src/EditPerson.py index a74f12bd8..f18613776 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -112,7 +112,7 @@ class EditPerson: self.pdmap = {} self.add_places = [] self.name_display = NameDisplay.displayer - self.should_guess_gender = (person.get_gramps_id() == '' and + self.should_guess_gender = (not person.get_gramps_id() and person.get_gender () == RelLib.Person.UNKNOWN) @@ -603,6 +603,9 @@ class EditPerson: if not self.should_guess_gender: return + gender = self.db.genderStats.guess_gender(unicode(entry.get_text ())) + self.gender.set_active( gender) + def build_menu(self,list,task,opt_menu,type): cell = gtk.CellRendererText() opt_menu.pack_start(cell,True)