[PATCH] Pressing Down Arrow Key in Icon View doesn't get you to view last items in some case
- From: Nelson Benítez <gnel cenobioracing com>
- To: nautilus-list gnome org
- Subject: [PATCH] Pressing Down Arrow Key in Icon View doesn't get you to view last items in some case
- Date: Mon, 17 Jul 2006 12:02:54 +0100
Hi,
filed as bug 316117[1], proposed patch attached.
[1] http://bugzilla.gnome.org/show_bug.cgi?id=316117
Index: libnautilus-private/nautilus-icon-container.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-container.c,v
retrieving revision 1.406
diff -p -u -r1.406 nautilus-icon-container.c
--- libnautilus-private/nautilus-icon-container.c 12 Dec 2005 16:59:10 -0000 1.406
+++ libnautilus-private/nautilus-icon-container.c 15 Jul 2006 20:05:31 -0000
@@ -2300,10 +2300,10 @@ compare_icons_vertical_first (NautilusIc
return +1;
}
if (ax < bx) {
- return -1;
+ return -2;
}
if (ax > bx) {
- return +1;
+ return +2;
}
return compare_icons_by_uri (container, icon_a, icon_b);
}
@@ -2468,16 +2468,25 @@ same_column_below_highest (NautilusIconC
NautilusIcon *candidate,
void *data)
{
- /* Candidates not on the start column do not qualify. */
- if (compare_with_start_column (container, candidate) != 0) {
+ EelCanvasItem *item;
+ int res;
+
+ item = EEL_CANVAS_ITEM (candidate->item);
+ /* Candidates on the start row do not qualify. */
+ if (! (container->details->arrow_key_start_y < item->y1 ||
+ container->details->arrow_key_start_y > item->y2)) {
return FALSE;
}
- /* Candidates that are lower lose out. */
if (best_so_far != NULL) {
- if (compare_icons_vertical_first (container,
- best_so_far,
- candidate) < 0) {
+ /* Candidates on the start column are preferred. */
+ if (compare_with_start_column (container, candidate) != 0
+ && compare_with_start_column (container, best_so_far) == 0) {
+ return FALSE;
+ }
+ /* Candidates that are lower lose out. */
+ res = compare_icons_vertical_first (container, best_so_far, candidate);
+ if (res == -1 || res == 2) {
return FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]