[Xfce4-commits] <xfce4-settings:master> Fix key navigation with hidden categories.
Nick Schermer
noreply at xfce.org
Thu Jan 26 23:02:12 CET 2012
Updating branch refs/heads/master
to a5800782880dcc7a9b174bd489517d686ff4471c (commit)
from 339aa7dcac4f4041597a5dbf8264fc78e8550923 (commit)
commit a5800782880dcc7a9b174bd489517d686ff4471c
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