From 9d9e20223748270e2a538a88cbee43caeee0d203 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Mon, 13 Aug 2018 11:49:22 +0300 Subject: [PATCH] list-view: Fix secondary-click selection Previously, the code would chain up to the parent button_press_event(), which is impossible with the introduction of gestures. A workaround for that is just unselecting everything and selecting the path that is underneath the pointer. --- src/nautilus-list-view.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c index 2dccb5959..263470195 100644 --- a/src/nautilus-list-view.c +++ b/src/nautilus-list-view.c @@ -840,15 +840,8 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture, /* Needed to select an item before popping up a menu. */ if (call_parent) { -#if 0 - GtkWidgetClass *tree_view_class; - - tree_view_class = GTK_WIDGET_GET_CLASS (tree_view); - - g_signal_handlers_block_by_func (tree_view, row_activated_callback, view); - tree_view_class->button_press_event (widget, (GdkEventButton *) event); - g_signal_handlers_unblock_by_func (tree_view, row_activated_callback, view); -#endif + gtk_tree_selection_unselect_all (selection); + gtk_tree_selection_select_path (selection, path); } else if (path_selected) {