svn: r6378
This commit is contained in:
parent
be545e2432
commit
aee92da466
@ -320,8 +320,8 @@ class EditFamily(EditPrimary):
|
||||
# family
|
||||
|
||||
if self.added and self.obj.get_father_handle() == None and \
|
||||
self.obj.get_mother_handle() == None and \
|
||||
len(self.obj.get_child_ref_list()) == 1:
|
||||
self.obj.get_mother_handle() == None and \
|
||||
len(self.obj.get_child_ref_list()) == 1:
|
||||
self.add_parent = True
|
||||
if not Config.get_family_warn():
|
||||
for i in self.hidden:
|
||||
@ -369,8 +369,11 @@ class EditFamily(EditPrimary):
|
||||
self.update_mother(mhandle)
|
||||
self.child_list.rebuild()
|
||||
|
||||
def build_menu_names(self,obj):
|
||||
return ('Edit Family','Undefined Submenu')
|
||||
def build_menu_names(self,family):
|
||||
win_menu_label = Utils.family_name(family,self.db,_("New Family"))
|
||||
if not win_menu_label.strip():
|
||||
win_menu_label = _("New Family")
|
||||
return (_('Edit Family'), win_menu_label)
|
||||
|
||||
def build_interface(self):
|
||||
|
||||
|
@ -82,7 +82,7 @@ class EditPrimary(ManagedWindow.ManagedWindow):
|
||||
pass
|
||||
|
||||
def build_window_key(self,obj):
|
||||
if obj:
|
||||
if obj and obj.get_handle():
|
||||
return obj.get_handle()
|
||||
else:
|
||||
return id(self)
|
||||
|
@ -261,7 +261,7 @@ def wasHistory_broken():
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
def family_name(family,db):
|
||||
def family_name(family,db,noname=_("unknown")):
|
||||
"""Builds a name for the family from the parents names"""
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
@ -278,7 +278,7 @@ def family_name(family,db):
|
||||
elif mother:
|
||||
name = NameDisplay.displayer.display(mother)
|
||||
else:
|
||||
name = _("unknown")
|
||||
name = noname
|
||||
return name
|
||||
|
||||
def family_upper_name(family,db):
|
||||
|
Loading…
Reference in New Issue
Block a user