* src/FamilyView.py (north_american,latin_american,icelandic): Fix

object/handle mixups.


svn: r4799
This commit is contained in:
Alex Roitman 2005-06-07 16:41:50 +00:00
parent e47701ab02
commit 4f15cfc10f
2 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2005-06-07 Alex Roitman <shura@gramps-project.org>
* src/FamilyView.py (north_american,latin_american,icelandic): Fix
object/handle mixups.
2005-06-05 Eero Tamminen <eerot@sf>
* src/po/fi.po: Translated rest of the tips (=everything).
Improved previous translations and fixed typos.

View File

@ -1549,10 +1549,10 @@ class FamilyView:
pname = self.person.get_primary_name()
return (pname.get_surname_prefix(),pname.get_surname())
elif self.family:
fid = self.family.get_father_handle()
f = self.parent.db.get_family_from_handle(fid)
if f:
pname = f.get_primary_name()
father_handle = self.family.get_father_handle()
if father_handle:
father = self.parent.db.get_person_from_handle(father_handle)
pname = father.get_primary_name()
return (pname.get_surname_prefix(),pname.get_surname())
return ("","")
@ -1561,10 +1561,12 @@ class FamilyView:
def latin_american(self,val):
if self.family:
father = self.family.get_father_handle()
mother = self.family.get_mother_handle()
if not father or not mother:
father_handle = self.family.get_father_handle()
mother_handle = self.family.get_mother_handle()
if not father_handle or not mother_handle:
return ("","")
father = self.parent.db.get_person_from_handle(father_handle)
mother = self.parent.db.get_person_from_handle(mother_handle)
fsn = father.get_primary_name().get_surname()
msn = mother.get_primary_name().get_surname()
if not father or not mother:
@ -1581,9 +1583,10 @@ class FamilyView:
if self.person.get_gender() == RelLib.Person.MALE:
fname = self.person.get_primary_name().get_first_name()
elif self.family:
f = self.family.get_father_handle()
if f:
fname = f.get_primary_name().get_first_name()
father_handle = self.family.get_father_handle()
if father_handle:
father = self.parent.db.get_person_from_handle(father_handle)
fname = father.get_primary_name().get_first_name()
if fname:
fname = fname.split()[0]
if val == 0: