From 8c2b1c4e5e6335423c335fd99ab852fe74c0999f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 7 Jul 2003 11:15:07 +0000 Subject: Cleanup. 2003-07-07 Marco Pesenti Gritti * lib/widgets/ephy-autocompletion-window.c: (ephy_autocompletion_window_key_press_cb): Cleanup. * lib/widgets/ephy-location-entry.c: (ephy_location_entry_key_press_event_cb): Handle Tab key binding. The window binding doesnt work because of the grab. --- lib/widgets/ephy-location-entry.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/widgets/ephy-location-entry.c') diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 076d8642f..f13c87e88 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -480,18 +480,28 @@ static gboolean ephy_location_entry_key_press_event_cb (GtkWidget *entry, GdkEventKey *event, EphyLocationEntry *w) { EphyLocationEntryPrivate *p = w->priv; + GtkWidget *window; switch (event->keyval) { case GDK_Left: case GDK_Right: ephy_location_entry_autocompletion_hide_alternatives (w); - return FALSE; + break; case GDK_Escape: ephy_location_entry_set_location (w, p->before_completion); gtk_editable_set_position (GTK_EDITABLE (p->entry), -1); ephy_location_entry_autocompletion_hide_alternatives (w); - return FALSE; + break; + case GDK_Tab: + case GDK_KP_Tab: + if (p->autocompletion_window_visible) + { + ephy_location_entry_autocompletion_hide_alternatives (w); + window = gtk_widget_get_toplevel (entry); + g_signal_emit_by_name (window, "move_focus", 1); + } + break; default: break; } -- cgit v1.2.3