aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2008-02-02 09:46:47 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-02-02 09:46:47 +0800
commit7b0d469dffce0f5e5f6a9f14b8c4cd3589c41f42 (patch)
tree335099d7e53fb03363a380e9362e453624efdab9 /lib
parent0fe299806d65b2982fb7dad83ad1a5cfb5e8e53e (diff)
downloadgsoc2013-epiphany-7b0d469dffce0f5e5f6a9f14b8c4cd3589c41f42.tar.gz
gsoc2013-epiphany-7b0d469dffce0f5e5f6a9f14b8c4cd3589c41f42.tar.zst
gsoc2013-epiphany-7b0d469dffce0f5e5f6a9f14b8c4cd3589c41f42.zip
Popup the completion dropdown menu when we're focusing the location bar
with the cursor at the end of entry and we press down. Bug #340572. svn path=/trunk/; revision=7908
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-location-entry.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 2121fe9cf..2dcd5386f 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -400,6 +400,21 @@ entry_key_press_after_cb (GtkEntry *entry,
return TRUE;
}
+
+ if ((event->keyval == GDK_Down || event->keyval == GDK_KP_Down)
+ && state == 0)
+ {
+ /* If we are focusing the entry, with the cursor at the end of it
+ * we emit the changed signal, so that the completion popup appears */
+ const char *string;
+
+ string = gtk_entry_get_text (entry);
+ if (gtk_editable_get_position (GTK_EDITABLE (entry)) == strlen (string))
+ {
+ g_signal_emit_by_name (entry, "changed", 0);
+ return TRUE;
+ }
+ }
return FALSE;
}