[Xfce4-commits] <midori:master> Tab should complete address if popup is visible
Christian Dywan
noreply at xfce.org
Fri Apr 29 04:50:01 CEST 2011
Updating branch refs/heads/master
to 3ec724c3dcc53a79b1b3338e99b2b59d2dc7f736 (commit)
from 4b272c0459edbc9f9bf204d0f5f44c77cb8e9981 (commit)
commit 3ec724c3dcc53a79b1b3338e99b2b59d2dc7f736
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Apr 29 03:53:59 2011 +0200
Tab should complete address if popup is visible
midori/midori-locationaction.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index f517606..8e796c5 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -894,6 +894,8 @@ midori_location_action_key_press_event_cb (GtkEntry* entry,
case GDK_KP_Down:
case GDK_Up:
case GDK_KP_Up:
+ case GDK_Tab:
+ case GDK_ISO_Left_Tab:
{
if (location_action->popup && gtk_widget_get_visible (location_action->popup))
{
@@ -903,7 +905,8 @@ midori_location_action_key_press_event_cb (GtkEntry* entry,
GtkTreeIter iter;
gint selected = location_action->completion_index;
- if (event->keyval == GDK_Down || event->keyval == GDK_KP_Down)
+ if (event->keyval == GDK_Down || event->keyval == GDK_KP_Down
+ || event->keyval == GDK_Tab || event->keyval == GDK_ISO_Left_Tab)
selected = MIN (selected + 1, matches -1);
else if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)
{
@@ -916,6 +919,8 @@ midori_location_action_key_press_event_cb (GtkEntry* entry,
selected = MIN (selected + 14, matches -1);
else if (event->keyval == GDK_Page_Up)
selected = MAX (selected - 14, 0);
+ else
+ g_assert_not_reached ();
path = gtk_tree_path_new_from_indices (selected, -1);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (location_action->treeview),
@@ -934,6 +939,9 @@ midori_location_action_key_press_event_cb (GtkEntry* entry,
return TRUE;
}
+ /* Allow Tab to handle focus if the popup is closed */
+ if (event->keyval == GDK_Tab || event->keyval == GDK_ISO_Left_Tab)
+ return FALSE;
return TRUE;
}
default:
More information about the Xfce4-commits
mailing list