expand/collapse all nodes in Person View
svn: r6505
This commit is contained in:
parent
3fe3482efb
commit
6c7affe80a
@ -1,3 +1,7 @@
|
||||
2006-05-01 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_PersonView.py (PersonView.define_actions): add
|
||||
expand and collapse all node menu entries
|
||||
|
||||
2006-05-01 Alex Roitman <shura@gramps-project.org>
|
||||
* various: merge changes from gramps20.
|
||||
|
||||
|
@ -114,6 +114,10 @@ class PersonView(PageView.PersonNavView):
|
||||
callback=self.edit)
|
||||
self.add_action('Remove', gtk.STOCK_REMOVE, "_Remove",
|
||||
callback=self.remove)
|
||||
self.add_action('OpenAllNodes', None, "Expand all nodes",
|
||||
callback=self.open_all_nodes)
|
||||
self.add_action('CloseAllNodes', None, "Close all nodes",
|
||||
callback=self.close_all_nodes)
|
||||
self.add_action('Jump', None, "_Jump",
|
||||
accel="<control>j",callback=self.jumpto)
|
||||
|
||||
@ -250,6 +254,9 @@ class PersonView(PageView.PersonNavView):
|
||||
<menuitem action="Forward"/>
|
||||
<menuitem action="HomePerson"/>
|
||||
<separator/>
|
||||
<menuitem action="OpenAllNodes"/>
|
||||
<menuitem action="CloseAllNodes"/>
|
||||
<separator/>
|
||||
<menuitem action="Add"/>
|
||||
<menuitem action="Edit"/>
|
||||
<menuitem action="Remove"/>
|
||||
@ -402,6 +409,12 @@ class PersonView(PageView.PersonNavView):
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def open_all_nodes(self,obj):
|
||||
self.tree.expand_all()
|
||||
|
||||
def close_all_nodes(self,obj):
|
||||
self.tree.collapse_all()
|
||||
|
||||
def remove(self,obj):
|
||||
mlist = self.get_selected_objects()
|
||||
if len(mlist) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user