feat: restore partial context menu functionality

This commit is contained in:
aclist committed 2026-02-23 02:24:14 +09:00
1 parent 5ae18485e8
commit 575e591c10
10 files changed
+68 -33

No files matched your search

+9 -2
View File
@@ -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