Matt McClinch wrote:
Hi Benny,
Sorry if I wasn't clear about what I was trying to say. Anyway, this
libexo patch fixes the problem as I see it. I really think this is a
better way to describe which files are between the anchor and the cursor.
Matt
Hmm, no thoughts? Okay, I've modified the patch. It's now more
straightforward and has less potential for being problematic in the
future. This patch is for current (r20816) libexo svn.
Matt
Index: exo/exo-icon-view.c
===================================================================
--- exo/exo-icon-view.c (revision 20816)
+++ exo/exo-icon-view.c (working copy)
@@ -3807,46 +3807,38 @@
ExoIconViewItem *cursor)
{
GList *items;
- ExoIconViewItem *item;
- gint row1, row2, col1, col2;
+ ExoIconViewItem *item, *last;
gboolean dirty = FALSE;
- if (anchor->row < cursor->row)
+ for (items = icon_view->priv->items; items; items = items->next)
{
- row1 = anchor->row;
- row2 = cursor->row;
- }
- else
- {
- row1 = cursor->row;
- row2 = anchor->row;
- }
+ item = items->data;
- if (anchor->col < cursor->col)
- {
- col1 = anchor->col;
- col2 = cursor->col;
+ if (item == anchor)
+ {
+ last = cursor;
+ break;
+ }
+ else if (item == cursor)
+ {
+ last = anchor;
+ break;
+ }
}
- else
- {
- col1 = cursor->col;
- col2 = anchor->col;
- }
- for (items = icon_view->priv->items; items; items = items->next)
+ for (; items; items = items->next)
{
item = items->data;
- if (row1 <= item->row && item->row <= row2 &&
- col1 <= item->col && item->col <= col2)
- {
- if (!item->selected)
- dirty = TRUE;
+ if (!item->selected)
+ dirty = TRUE;
- item->selected = TRUE;
-
- exo_icon_view_queue_draw_item (icon_view, item);
- }
+ item->selected = TRUE;
+
+ exo_icon_view_queue_draw_item (icon_view, item);
+
+ if (item == last)
+ break;
}
return dirty;
_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev