mirror of
https://github.com/aclist/dztui.git
synced 2026-11-02 16:12:11 +01:00
feat: restore partial context menu functionality
This commit is contained in:
1 parent
5ae18485e8
commit
575e591c10
10 files changed
+68
-33
No files matched your search
@@ -19,7 +19,6 @@ class ContextMixin(TreeView):
|
||||
event: Gdk.EventButton | Gdk.EventKey,
|
||||
) -> None:
|
||||
|
||||
# FIXME: start debug log focused
|
||||
if self.is_selection_empty():
|
||||
return False
|
||||
|
||||
@@ -80,7 +79,15 @@ class ContextMixin(TreeView):
|
||||
(path, col, cellx, celly) = pathinfo
|
||||
if path is None:
|
||||
return True
|
||||
self.set_cursor(path, col, False)
|
||||
# return True
|
||||
selection = self.get_selection()
|
||||
model, selected_paths = selection.get_selected_rows()
|
||||
if path not in selected_paths:
|
||||
for p in selected_paths:
|
||||
selection.unselect_path(p)
|
||||
self.set_cursor(path, col, False)
|
||||
return True
|
||||
# FIXME: if selection is not multiple, change cursor
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in new issue
Block a user