summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-01-02 19:11:32 -0500
committerlukefromdc <[email protected]>2017-01-02 19:14:58 -0500
commit4c2e3dc62e5258d3c3b14606f9452efd3763ba0e (patch)
tree14cd53589e9c40ffcc678731bc645cb2dbb61053 /libcaja-private
parentdbce9dbdf16b7d8afc8e0c1b6166b26221e1466f (diff)
downloadcaja-4c2e3dc62e5258d3c3b14606f9452efd3763ba0e.tar.bz2
caja-4c2e3dc62e5258d3c3b14606f9452efd3763ba0e.tar.xz
Fix keyboard-down wraparound on compact view
Fix https://github.com/mate-desktop/caja/issues/671 Apply https://git.gnome.org/browse/nautilus/commit/?id=40be4b85f51fc7b192ef7421b2ede27954997cc8
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-container.c48
1 files changed, 22 insertions, 26 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 50272ce7..4750169b 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -3981,7 +3981,7 @@ keyboard_arrow_key (CajaIconContainer *container,
IsBetterIconFunction better_start,
IsBetterIconFunction empty_start,
IsBetterIconFunction better_destination,
- IsBetterIconFunction better_destination_fallback_if_no_a11y,
+ IsBetterIconFunction better_destination_fallback,
IsBetterIconFunction better_destination_fallback_fallback,
IsBetterIconFunction better_destination_manual)
{
@@ -4038,16 +4038,12 @@ keyboard_arrow_key (CajaIconContainer *container,
container->details->auto_layout ? better_destination : better_destination_manual,
&data);
- /* only wrap around to next/previous row/column if no a11y is used.
- * Visually impaired people may be easily confused by this.
- */
+ /* Wrap around to next/previous row/column */
if (to == NULL &&
- better_destination_fallback_if_no_a11y != NULL &&
- ATK_IS_NO_OP_OBJECT (gtk_widget_get_accessible (GTK_WIDGET (container))))
- {
+ better_destination_fallback != NULL) {
to = find_best_icon
(container, from,
- better_destination_fallback_if_no_a11y,
+ better_destination_fallback,
&data);
}
@@ -4099,15 +4095,15 @@ static void
keyboard_right (CajaIconContainer *container,
GdkEventKey *event)
{
- IsBetterIconFunction no_a11y;
+ IsBetterIconFunction fallback;
IsBetterIconFunction next_column_fallback;
- no_a11y = NULL;
+ fallback = NULL;
if (container->details->auto_layout &&
!caja_icon_container_is_layout_vertical (container) &&
!is_rectangle_selection_event (event))
{
- no_a11y = next_row_leftmost;
+ fallback = next_row_leftmost;
}
next_column_fallback = NULL;
@@ -4127,7 +4123,7 @@ keyboard_right (CajaIconContainer *container,
caja_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_row_right_side_leftmost,
- no_a11y,
+ fallback,
next_column_fallback,
closest_in_90_degrees);
}
@@ -4136,15 +4132,15 @@ static void
keyboard_left (CajaIconContainer *container,
GdkEventKey *event)
{
- IsBetterIconFunction no_a11y;
+ IsBetterIconFunction fallback;
IsBetterIconFunction previous_column_fallback;
- no_a11y = NULL;
+ fallback = NULL;
if (container->details->auto_layout &&
!caja_icon_container_is_layout_vertical (container) &&
!is_rectangle_selection_event (event))
{
- no_a11y = previous_row_rightmost;
+ fallback = previous_row_rightmost;
}
previous_column_fallback = NULL;
@@ -4164,7 +4160,7 @@ keyboard_left (CajaIconContainer *container,
caja_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_row_left_side_rightmost,
- no_a11y,
+ fallback,
previous_column_fallback,
closest_in_90_degrees);
}
@@ -4173,21 +4169,21 @@ static void
keyboard_down (CajaIconContainer *container,
GdkEventKey *event)
{
- IsBetterIconFunction no_a11y;
+ IsBetterIconFunction fallback;
IsBetterIconFunction next_row_fallback;
- no_a11y = NULL;
+ fallback = NULL;
if (container->details->auto_layout &&
caja_icon_container_is_layout_vertical (container) &&
!is_rectangle_selection_event (event))
{
if (gtk_widget_get_direction (GTK_WIDGET (container)) == GTK_TEXT_DIR_RTL)
{
- no_a11y = previous_column_highest;
+ fallback = previous_column_highest;
}
else
{
- no_a11y = next_column_highest;
+ fallback = next_column_highest;
}
}
@@ -4214,7 +4210,7 @@ keyboard_down (CajaIconContainer *container,
caja_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_column_below_highest,
- no_a11y,
+ fallback,
next_row_fallback,
closest_in_90_degrees);
}
@@ -4223,20 +4219,20 @@ static void
keyboard_up (CajaIconContainer *container,
GdkEventKey *event)
{
- IsBetterIconFunction no_a11y;
+ IsBetterIconFunction fallback;
- no_a11y = NULL;
+ fallback = NULL;
if (container->details->auto_layout &&
caja_icon_container_is_layout_vertical (container) &&
!is_rectangle_selection_event (event))
{
if (gtk_widget_get_direction (GTK_WIDGET (container)) == GTK_TEXT_DIR_RTL)
{
- no_a11y = next_column_bottommost;
+ fallback = next_column_bottommost;
}
else
{
- no_a11y = previous_column_lowest;
+ fallback = previous_column_lowest;
}
}
@@ -4250,7 +4246,7 @@ keyboard_up (CajaIconContainer *container,
caja_icon_container_is_layout_rtl (container) ?
rightmost_in_top_row : leftmost_in_top_row,
same_column_above_lowest,
- no_a11y,
+ fallback,
NULL,
closest_in_90_degrees);
}