improve the left arrow behaviour in treeview: select parent row when we cannot collapse row
This commit is contained in:
parent
27ca6e13c5
commit
40d5b2469d
|
@ -3441,9 +3441,12 @@ class RosterWindow:
|
|||
return
|
||||
path = list_of_paths[0]
|
||||
iter_ = model.get_iter(path)
|
||||
if model.iter_has_child(iter_):
|
||||
if model.iter_has_child(iter_) and self.tree.row_expanded(path):
|
||||
self.tree.collapse_row(path)
|
||||
return True
|
||||
elif len(path) > 1:
|
||||
self.tree.set_cursor(path[:-1])
|
||||
return True
|
||||
elif event.keyval == gtk.keysyms.Right:
|
||||
treeselection = self.tree.get_selection()
|
||||
model, list_of_paths = treeselection.get_selected_rows()
|
||||
|
|
Loading…
Reference in New Issue