[Xfce4-commits] <xfce4-settings:nick/settings-manager> Fix key navigation with hidden categories.
Nick Schermer
noreply at xfce.org
Thu Jan 26 20:08:02 CET 2012
Updating branch refs/heads/nick/settings-manager
to 394f1a2944bee2ea213521015645b22182e5798d (commit)
from dfffae65d28e1f4c89982b9465b40b71a2bf674c (commit)
commit 394f1a2944bee2ea213521015645b22182e5798d
Author: Nick Schermer <nick at xfce.org>
Date: Thu Jan 26 19:48:10 2012 +0100
Fix key navigation with hidden categories.
.../xfce-settings-manager-dialog.c | 23 +++++++++++++++----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index f55bceb..b7fe5d4 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -401,14 +401,27 @@ xfce_settings_manager_dialog_iconview_keynav_failed (ExoIconView *
if (direction == GTK_DIR_UP || direction == GTK_DIR_DOWN)
{
+ /* find this category in the list */
li = g_list_find_custom (dialog->categories, current_view,
xfce_settings_manager_dialog_iconview_find);
- if (direction == GTK_DIR_DOWN)
- li = g_list_next (li);
- else
- li = g_list_previous (li);
- /* leave there is no view obove or below this one */
+ /* find the next of previous visible item */
+ for (; li != NULL; )
+ {
+ if (direction == GTK_DIR_DOWN)
+ li = g_list_next (li);
+ else
+ li = g_list_previous (li);
+
+ if (li != NULL)
+ {
+ category = li->data;
+ if (gtk_widget_get_visible (category->box))
+ break;
+ }
+ }
+
+ /* leave there is no view above or below this one */
if (li == NULL)
return FALSE;
More information about the Xfce4-commits
mailing list