Fix problem adding child to single parent family.
svn: r603
This commit is contained in:
parent
de95ce3c9f
commit
bbe86f7d5a
@ -66,17 +66,29 @@ class SelectChild:
|
|||||||
self.add_child = self.xml.get_widget("addChild")
|
self.add_child = self.xml.get_widget("addChild")
|
||||||
self.add_child.set_column_visibility(1,Config.id_visible)
|
self.add_child.set_column_visibility(1,Config.id_visible)
|
||||||
|
|
||||||
father = self.family.getFather()
|
if (self.family):
|
||||||
if father != None:
|
father = self.family.getFather()
|
||||||
fname = father.getPrimaryName().getName()
|
mother = self.family.getMother()
|
||||||
ftitle = _("Relationship to %s") % fname
|
|
||||||
self.xml.get_widget("flabel").set_text(ftitle)
|
|
||||||
|
|
||||||
mother = self.family.getMother()
|
if father != None:
|
||||||
if mother != None:
|
fname = father.getPrimaryName().getName()
|
||||||
mname = mother.getPrimaryName().getName()
|
label = _("Relationship to %s") % fname
|
||||||
mtitle = _("Relationship to %s") % mname
|
self.xml.get_widget("flabel").set_text(label)
|
||||||
self.xml.get_widget("mlabel").set_text(mtitle)
|
|
||||||
|
if mother != None:
|
||||||
|
mname = mother.getPrimaryName().getName()
|
||||||
|
label = _("Relationship to %s") % mname
|
||||||
|
self.xml.get_widget("mlabel").set_text(label)
|
||||||
|
else:
|
||||||
|
fname = self.person.getPrimaryName().getName()
|
||||||
|
label = _("Relationship to %s") % fname
|
||||||
|
|
||||||
|
if self.person.getGender() == Person.male:
|
||||||
|
self.xml.get_widget("flabel").set_text(label)
|
||||||
|
self.xml.get_widget("mrel_combo").set_sensitive(0)
|
||||||
|
else:
|
||||||
|
self.xml.get_widget("mlabel").set_text(label)
|
||||||
|
self.xml.get_widget("frel_combo").set_sensitive(0)
|
||||||
|
|
||||||
self.mrel = self.xml.get_widget("mrel")
|
self.mrel = self.xml.get_widget("mrel")
|
||||||
self.frel = self.xml.get_widget("frel")
|
self.frel = self.xml.get_widget("frel")
|
||||||
|
Loading…
Reference in New Issue
Block a user