aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-07 19:15:07 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-07 19:15:07 +0800
commit8c2b1c4e5e6335423c335fd99ab852fe74c0999f (patch)
treeaa04069966c6138ff659ca4fd9f6fd34a5ea9d3d
parent3c2105e20f61af4cf4f94f35588dc0d6cf750e9b (diff)
downloadgsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar.gz
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar.bz2
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar.lz
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar.xz
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.tar.zst
gsoc2013-epiphany-8c2b1c4e5e6335423c335fd99ab852fe74c0999f.zip
Cleanup.
2003-07-07 Marco Pesenti Gritti <marco@it.gnome.org> * 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.
-rw-r--r--ChangeLog13
-rw-r--r--lib/widgets/ephy-autocompletion-window.c22
-rw-r--r--lib/widgets/ephy-location-entry.c14
3 files changed, 29 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index a873ccbc6..715a1a097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
2003-07-07 Marco Pesenti Gritti <marco@it.gnome.org>
* 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.
+
+2003-07-07 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * lib/widgets/ephy-autocompletion-window.c:
(ephy_autocompletion_window_finalize_impl),
(ephy_autocompletion_window_show), (move_selection),
(ephy_autocompletion_window_key_press_hack),
diff --git a/lib/widgets/ephy-autocompletion-window.c b/lib/widgets/ephy-autocompletion-window.c
index 91e69df3c..a4a873610 100644
--- a/lib/widgets/ephy-autocompletion-window.c
+++ b/lib/widgets/ephy-autocompletion-window.c
@@ -750,11 +750,9 @@ ephy_autocompletion_window_key_press_cb (GtkWidget *widget,
GdkEventKey *event,
EphyAutocompletionWindow *aw)
{
- GdkEventKey tmp_event;
EphyAutocompletionWindowPrivate *p = aw->priv;
- GtkWidget *dest_widget;
+ GdkEventKey tmp_event;
- /* allow keyboard navigation in the alternatives clist */
if (event->keyval == GDK_Up || event->keyval == GDK_Down
|| event->keyval == GDK_Page_Up || event->keyval == GDK_Page_Down
|| ((event->keyval == GDK_space || event->keyval == GDK_Return)
@@ -763,23 +761,11 @@ ephy_autocompletion_window_key_press_cb (GtkWidget *widget,
return ephy_autocompletion_window_key_press_hack
(aw, event->keyval);
}
- else
- {
- dest_widget = p->parent;
- }
-
- if (dest_widget != widget)
- {
- tmp_event = *event;
- gtk_widget_event (dest_widget, (GdkEvent *)&tmp_event);
- return TRUE;
- }
- else
- {
- return FALSE;
- }
+ tmp_event = *event;
+ gtk_widget_event (p->parent, (GdkEvent *)&tmp_event);
+ return TRUE;
}
void
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;
}