Commit d02c986b authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

In LTR mode, always jump to the top-left icon if no icon is selected. In

2008-09-01  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-icon-container.c
	(rightmost_in_top_row), (keyboard_right), (keyboard_left),
	(keyboard_down), (keyboard_up):
	In LTR mode, always jump to the top-left icon if no icon is selected.
	In RTL mode, always jump to the top-right icon if no icon is selected.

svn path=/trunk/; revision=14564
parent 15682373
2008-09-01 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-container.c
(rightmost_in_top_row), (keyboard_right), (keyboard_left),
(keyboard_down), (keyboard_up):
In LTR mode, always jump to the top-left icon if no icon is selected.
In RTL mode, always jump to the top-right icon if no icon is selected.
2008-09-01 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-container.c
......
......@@ -2971,6 +2971,20 @@ leftmost_in_top_row (NautilusIconContainer *container,
return compare_icons_vertical_first (container, best_so_far, candidate) > 0;
}
static gboolean
rightmost_in_top_row (NautilusIconContainer *container,
NautilusIcon *start_icon,
NautilusIcon *best_so_far,
NautilusIcon *candidate,
void *data)
{
if (best_so_far == NULL) {
return TRUE;
}
return compare_icons_vertical (container, best_so_far, candidate) > 0;
return compare_icons_horizontal (container, best_so_far, candidate) < 0;
}
static gboolean
rightmost_in_bottom_row (NautilusIconContainer *container,
NautilusIcon *start_icon,
......@@ -3717,7 +3731,8 @@ keyboard_right (NautilusIconContainer *container,
event,
GTK_DIR_RIGHT,
rightmost_in_bottom_row,
leftmost_in_top_row,
nautilus_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_row_right_side_leftmost,
no_a11y,
next_column_fallback,
......@@ -3750,8 +3765,9 @@ keyboard_left (NautilusIconContainer *container,
keyboard_arrow_key (container,
event,
GTK_DIR_LEFT,
leftmost_in_top_row,
rightmost_in_bottom_row,
nautilus_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_row_left_side_rightmost,
no_a11y,
previous_column_fallback,
......@@ -3792,7 +3808,8 @@ keyboard_down (NautilusIconContainer *container,
event,
GTK_DIR_DOWN,
rightmost_in_bottom_row,
leftmost_in_top_row,
nautilus_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_column_below_highest,
no_a11y,
next_row_fallback,
......@@ -3822,8 +3839,9 @@ keyboard_up (NautilusIconContainer *container,
keyboard_arrow_key (container,
event,
GTK_DIR_UP,
leftmost_in_top_row,
rightmost_in_bottom_row,
nautilus_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_column_above_lowest,
no_a11y,
NULL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment