diff options
author | lukefromdc <[email protected]> | 2017-01-02 19:11:32 -0500 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-22 13:29:11 +0300 |
commit | d6dd10e66392e9b433eec39d8c86993d1d4386c9 (patch) | |
tree | 76bfc7c612d9cf3c9678ff13e7a6a03b072f14c7 /libcaja-private | |
parent | 707dbc1372b9aa1b3f8a19b3689c51114e7784f2 (diff) | |
download | caja-d6dd10e66392e9b433eec39d8c86993d1d4386c9.tar.bz2 caja-d6dd10e66392e9b433eec39d8c86993d1d4386c9.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.c | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index d785f3e2..73797053 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -4137,7 +4137,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) { @@ -4194,16 +4194,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); } @@ -4255,15 +4251,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; @@ -4283,7 +4279,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); } @@ -4292,15 +4288,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; @@ -4320,7 +4316,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); } @@ -4329,21 +4325,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; } } @@ -4370,7 +4366,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); } @@ -4379,20 +4375,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; } } @@ -4406,7 +4402,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); } |