From e32e5942ceb84de1127e2f400e95b303833c5709 Mon Sep 17 00:00:00 2001 From: bud <robstenklippa@gmail.com> Date: Fri, 30 Oct 2020 00:17:45 +0100 Subject: [PATCH] REFACTOR: always queue_popup in details view on right click (#421) This makes rightclick+drag in details view bring up the GDK_ACTION_ASK menu for the dragged file. This behavior was prior to this commit not present when an item was dragged from the NAME column. --- thunar/thunar-details-view.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c index 2b34a9c89..86f501234 100644 --- a/thunar/thunar-details-view.c +++ b/thunar/thunar-details-view.c @@ -716,27 +716,15 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view, } else { - if (column != name_column) - { - /* if the clicked path is not selected, unselect all other paths */ - if (!gtk_tree_selection_path_is_selected (selection, path)) - gtk_tree_selection_unselect_all (selection); - - /* queue the menu popup */ - thunar_standard_view_queue_popup (THUNAR_STANDARD_VIEW (details_view), event); - } - else + /* select the clicked path if necessary */ + if (!gtk_tree_selection_path_is_selected (selection, path)) { - /* select the clicked path if necessary */ - if (!gtk_tree_selection_path_is_selected (selection, path)) - { - gtk_tree_selection_unselect_all (selection); - gtk_tree_selection_select_path (selection, path); - } - - /* show the context menu */ - thunar_standard_view_context_menu (THUNAR_STANDARD_VIEW (details_view)); + gtk_tree_selection_unselect_all (selection); + gtk_tree_selection_select_path (selection, path); } + + /* show the context menu */ + thunar_standard_view_queue_popup (THUNAR_STANDARD_VIEW (details_view), event); gtk_tree_path_free (path); } -- GitLab