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.
This commit is contained in:
Ernestas Kulik 2018-08-13 11:49:22 +03:00
parent efa57b2014
commit 9d9e202237

View file

@ -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)
{