4413: Selecting a Family record does not cause the Relationship view to show that relationship
svn: r16229
This commit is contained in:
parent
d9b544c17a
commit
7d9dac90ff
@ -181,6 +181,9 @@ class FamilyView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
|
<menuitem action="MakeFatherActive"/>
|
||||||
|
<menuitem action="MakeMotherActive"/>
|
||||||
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport">
|
||||||
<menuitem action="Dummy"/>
|
<menuitem action="Dummy"/>
|
||||||
</menu>
|
</menu>
|
||||||
@ -197,6 +200,10 @@ class FamilyView(ListView):
|
|||||||
|
|
||||||
self.all_action = gtk.ActionGroup(self.title + "/FamilyAll")
|
self.all_action = gtk.ActionGroup(self.title + "/FamilyAll")
|
||||||
self.all_action.add_actions([
|
self.all_action.add_actions([
|
||||||
|
('MakeFatherActive', gtk.STOCK_APPLY, _("Make Father Active"),
|
||||||
|
None, None, self._make_father_active),
|
||||||
|
('MakeMotherActive', gtk.STOCK_APPLY, _("Make Mother Active"),
|
||||||
|
None, None, self._make_mother_active),
|
||||||
('QuickReport', None, _("Quick View"), None, None, None),
|
('QuickReport', None, _("Quick View"), None, None, None),
|
||||||
('Dummy', None, ' ', None, None, self.dummy_report),
|
('Dummy', None, ' ', None, None, self.dummy_report),
|
||||||
])
|
])
|
||||||
@ -275,6 +282,26 @@ class FamilyView(ListView):
|
|||||||
import Merge
|
import Merge
|
||||||
Merge.MergeFamilies(self.dbstate, self.uistate, mlist[0], mlist[1])
|
Merge.MergeFamilies(self.dbstate, self.uistate, mlist[0], mlist[1])
|
||||||
|
|
||||||
|
def _make_father_active(self, obj):
|
||||||
|
"""
|
||||||
|
Make the father of the family the active person.
|
||||||
|
"""
|
||||||
|
fhandle = self.first_selected()
|
||||||
|
if fhandle:
|
||||||
|
family = self.dbstate.db.get_family_from_handle(fhandle)
|
||||||
|
if family:
|
||||||
|
self.uistate.set_active(family.father_handle, 'Person')
|
||||||
|
|
||||||
|
def _make_mother_active(self, obj):
|
||||||
|
"""
|
||||||
|
Make the mother of the family the active person.
|
||||||
|
"""
|
||||||
|
fhandle = self.first_selected()
|
||||||
|
if fhandle:
|
||||||
|
family = self.dbstate.db.get_family_from_handle(fhandle)
|
||||||
|
if family:
|
||||||
|
self.uistate.set_active(family.mother_handle, 'Person')
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
def dummy_report(self, obj):
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
""" For the xml UI definition of popup to work, the submenu
|
||||||
Quick Report must have an entry in the xml
|
Quick Report must have an entry in the xml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user