From b9ed5c29b38fcb80b1bcc6c842ccdccfe0703db2 Mon Sep 17 00:00:00 2001 From: Alexander Schwinn <alexxcons@xfce.org> Date: Sun, 29 Aug 2021 00:14:16 +0200 Subject: [PATCH] Reverting e32e5942 (fix for rightclick+drag in detailed view) Since it introduced a regression (folder context menu on right click does not show any more on non-name column) See comments on MR !45 --- thunar/thunar-details-view.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c index a43520318..1b52f611b 100644 --- a/thunar/thunar-details-view.c +++ b/thunar/thunar-details-view.c @@ -717,15 +717,27 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view, } else { - /* select the clicked path if necessary */ - if (!gtk_tree_selection_path_is_selected (selection, path)) + if (column != name_column) { - gtk_tree_selection_unselect_all (selection); - gtk_tree_selection_select_path (selection, path); - } + /* 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); - /* show the context menu */ - thunar_standard_view_queue_popup (THUNAR_STANDARD_VIEW (details_view), event); + /* 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)) + { + 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_path_free (path); } -- GitLab