get_id updates
svn: r2846
This commit is contained in:
@@ -84,8 +84,8 @@ class SelectChild:
|
||||
self.add_child = self.xml.get_widget("childlist")
|
||||
|
||||
if (self.family):
|
||||
father = self.family.get_father_id()
|
||||
mother = self.family.get_mother_id()
|
||||
father = self.db.find_person_from_id(self.family.get_father_id())
|
||||
mother = self.db.find_person_from_id(self.family.get_mother_id())
|
||||
|
||||
if father != None:
|
||||
fname = father.get_primary_name().get_name()
|
||||
@@ -145,7 +145,7 @@ class SelectChild:
|
||||
elif family.get_mother_id():
|
||||
slist[ffamily.get_mother_id()] = 1
|
||||
for c in family.get_child_id_list():
|
||||
slist[c.get_id()] = 1
|
||||
slist[c] = 1
|
||||
|
||||
person_list = []
|
||||
for key in self.db.sort_person_keys():
|
||||
@@ -221,16 +221,16 @@ class SelectChild:
|
||||
else:
|
||||
self.family.set_mother_id(self.person)
|
||||
|
||||
self.family.add_child_id(select_child)
|
||||
self.family.add_child_id(select_child.get_id())
|
||||
|
||||
mrel = const.child_relations.find_value(self.mrel.get_text())
|
||||
mother = self.family.get_mother_id()
|
||||
mother = self.db.find_person_from_id(self.family.get_mother_id())
|
||||
if mother and mother.get_gender() != RelLib.Person.female:
|
||||
if mrel == "Birth":
|
||||
mrel = "Unknown"
|
||||
|
||||
frel = const.child_relations.find_value(self.frel.get_text())
|
||||
father = self.family.get_father_id()
|
||||
father = self.db.find_person_from_id(self.family.get_father_id())
|
||||
if father and father.get_gender() !=RelLib. Person.male:
|
||||
if frel == "Birth":
|
||||
frel = "Unknown"
|
||||
@@ -293,7 +293,8 @@ class SelectChild:
|
||||
|
||||
class EditRel:
|
||||
|
||||
def __init__(self,child,family,update):
|
||||
def __init__(self,db,child,family,update):
|
||||
self.db = db
|
||||
self.update = update
|
||||
self.child = child
|
||||
self.family = family
|
||||
@@ -311,8 +312,8 @@ class EditRel:
|
||||
Utils.set_titles(self.top,self.xml.get_widget('title'),
|
||||
_('Relationships of %s') % name)
|
||||
|
||||
father = self.family.get_father_id()
|
||||
mother = self.family.get_mother_id()
|
||||
father = self.db.find_person_from_id(self.family.get_father_id())
|
||||
mother = self.db.find_person_from_id(self.family.get_mother_id())
|
||||
|
||||
if father:
|
||||
fname = father.get_primary_name().get_name()
|
||||
@@ -354,17 +355,17 @@ class EditRel:
|
||||
|
||||
def on_ok_clicked(self,obj):
|
||||
mrel = const.child_relations.find_value(self.mentry.get_text())
|
||||
mother = self.family.get_mother_id()
|
||||
mother = self.db.find_person_from_id(self.family.get_mother_id())
|
||||
if mother and mother.get_gender() != RelLib.Person.female:
|
||||
if mrel == "Birth":
|
||||
mrel = "Unknown"
|
||||
|
||||
frel = const.child_relations.find_value(self.fentry.get_text())
|
||||
father = self.family.get_father_id()
|
||||
father = self.db.find_person_from_id(self.family.get_father_id())
|
||||
if father and father.get_gender() !=RelLib. Person.male:
|
||||
if frel == "Birth":
|
||||
frel = "Unknown"
|
||||
|
||||
self.child.change_parent_family_id(self.family,mrel,frel)
|
||||
self.child.change_parent_family_id(self.family.get_id(),mrel,frel)
|
||||
self.update()
|
||||
self.top.destroy()
|
||||
|
||||
Reference in New Issue
Block a user