Extra keybinding/buttonbinding on treeviews for usability

Shift+enter and dblclick: expand group and children


svn: r14019
This commit is contained in:
Benny Malengier
2010-01-10 12:20:13 +00:00
parent 1946440fc2
commit 2e65bfcce4
3 changed files with 90 additions and 56 deletions

View File

@@ -415,18 +415,6 @@ class PersonView(ListView):
self.all_action.set_visible(False)
self.edit_action.set_visible(False)
def open_all_nodes(self, obj):
self.uistate.status_text(_("Updating display..."))
self.uistate.set_busy_cursor(True)
self.list.expand_all()
self.uistate.set_busy_cursor(False)
self.uistate.modify_statusbar(self.dbstate)
def close_all_nodes(self, obj):
self.list.collapse_all()
def cmp_merge(self, obj):
mlist = self.get_selected_objects()

View File

@@ -175,43 +175,3 @@ class PlaceTreeView(PlaceBaseView):
EditPlace(self.dbstate, self.uistate, [], place)
except Errors.WindowActiveError:
pass
def open_branch(self, obj):
"""
Expand the selected branches and all children.
"""
self.uistate.status_text(_("Updating display..."))
self.uistate.set_busy_cursor(True)
selected = self.selection.get_selected_rows()
for path in selected[1]:
self.list.expand_row(path, True)
self.uistate.set_busy_cursor(False)
self.uistate.modify_statusbar(self.dbstate)
def close_branch(self, obj):
"""
Collapse the selected branches.
"""
selected = self.selection.get_selected_rows()
for path in selected[1]:
self.list.collapse_row(path)
def open_all_nodes(self, obj):
"""
Expand the entire tree.
"""
self.uistate.status_text(_("Updating display..."))
self.uistate.set_busy_cursor(True)
self.list.expand_all()
self.uistate.set_busy_cursor(False)
self.uistate.modify_statusbar(self.dbstate)
def close_all_nodes(self, obj):
"""
Collapse the entire tree.
"""
self.list.collapse_all()