Benedikt Meurer wrote:

Matt McClinch wrote:
Exactly. It's what I'm used to, and I'm not just talking about Explorer. I figured it was the accepted function of the control key, and this change would make it more consistant both internally and externally. I'm not too concerned about suggestion #1; you must have had a reason for deciding to do nothing if the item is already selected. If that's the way you want it, then so be it. However, other users will probably expect the same behaviour that I do. Also, following my advice on this point would make icon view more consistant with detailed list view. As a side note, in detailed list view, Control+Shift+Click acts just like an unmodified click, which IMO is less than ideal. I don't know how much can be done about that; I know GtkTreeView has its limitations. Anyway, I'm not too concerned about it -- just wanted to throw it out there.

I'm fine with the suggestion, just wanted to make sure, I got you right.

Do you want to provide a patch? (but please make sure to also include
the single-click-timeout case)

Matt

Benedikt
Here you go. I tested it in both single click mode and double click mode, and it works the same way in each. I didn't add any code for the single-click-timeout case, because I wouldn't know how to test it (or where to add it, for that matter). Is it a hidden option or something?

Matt
Index: exo/exo-icon-view.c
===================================================================
--- exo/exo-icon-view.c	(revision 20827)
+++ exo/exo-icon-view.c	(working copy)
@@ -2075,20 +2075,17 @@
           else if (icon_view->priv->selection_mode == GTK_SELECTION_MULTIPLE &&
                    (event->state & GDK_SHIFT_MASK))
             {
-              /* check if the item is not already selected (otherwise do nothing) */
-              if (G_LIKELY (!item->selected))
-                {
-                  exo_icon_view_unselect_all_internal (icon_view);
+              if (!(event->state & GDK_CONTROL_MASK)) 
+                exo_icon_view_unselect_all_internal (icon_view);
 
-                  exo_icon_view_set_cursor_item (icon_view, item, cursor_cell);
-                  if (!icon_view->priv->anchor_item)
-                    icon_view->priv->anchor_item = item;
-                  else 
-                    exo_icon_view_select_all_between (icon_view,
-                                                      icon_view->priv->anchor_item,
-                                                      item);
-                  dirty = TRUE;
-                }
+              exo_icon_view_set_cursor_item (icon_view, item, cursor_cell);
+              if (!icon_view->priv->anchor_item)
+                icon_view->priv->anchor_item = item;
+              else 
+                exo_icon_view_select_all_between (icon_view,
+                                                  icon_view->priv->anchor_item,
+                                                  item);
+              dirty = TRUE;
             }
           else 
             {
_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev

Reply via email to