[Xfce4-commits] [xfce/thunar] 06/06: Use "Name" column for drag & drop instead of first column (bug #11905)
noreply at xfce.org
noreply at xfce.org
Fri May 15 18:37:10 CEST 2015
This is an automated email from the git hooks/post-receive script.
hjudt pushed a commit to branch master
in repository xfce/thunar.
commit 1ba30278f554c3003170b46405031ef27f2d443a
Author: Harald Judt <h.judt at gmx.at>
Date: Fri May 15 17:02:12 2015 +0200
Use "Name" column for drag & drop instead of first column (bug #11905)
Instead of simply using the first column for drag & drop and the other
columns for starting the rubberband selection it is better to use the
column showing the filenames for this, as the user can change its position.
---
thunar/thunar-details-view.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c
index a093434..ba418aa 100644
--- a/thunar/thunar-details-view.c
+++ b/thunar/thunar-details-view.c
@@ -662,7 +662,7 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view,
GtkTreePath *path = NULL;
GtkTreeIter iter;
GtkTreeViewColumn *column;
- GtkTreeViewColumn *first_column;
+ GtkTreeViewColumn *name_column;
ThunarFile *file;
GtkAction *action;
ThunarPreferences *preferences;
@@ -676,8 +676,8 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view,
/* get the current selection */
selection = gtk_tree_view_get_selection (tree_view);
- /* get the first column of the tree view */
- first_column = gtk_tree_view_get_column (tree_view, 0);
+ /* get the column showing the filenames */
+ name_column = details_view->columns[THUNAR_COLUMN_NAME];
/* unselect all selected items if the user clicks on an empty area
* of the treeview and no modifier key is active */
@@ -698,12 +698,12 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view,
{
gtk_tree_path_free (cursor_path);
- if (column != first_column)
+ if (column != name_column)
gtk_tree_selection_unselect_all (selection);
- /* do not start rubber banding from the first column */
+ /* do not start rubber banding from the name column */
if (!gtk_tree_selection_path_is_selected (selection, path)
- && column == first_column)
+ && column == name_column)
{
/* the clicked row does not have the focus and is not
* selected, so make it the new selection (start) */
@@ -729,7 +729,7 @@ thunar_details_view_button_press_event (GtkTreeView *tree_view,
}
else
{
- if (column != first_column)
+ if (column != name_column)
{
/* if the clicked path is not selected, unselect all other paths */
if (!gtk_tree_selection_path_is_selected (selection, path))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list