[epiphany] location-entry: Make CTRL+l work when the completion menu is shown
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] location-entry: Make CTRL+l work when the completion menu is shown
- Date: Mon, 31 Mar 2014 12:40:56 +0000 (UTC)
commit 3b425285ffd6f331c93458bbf6236c474f3e1f4d
Author: Thomas Perl <thp thpinfo com>
Date: Mon Mar 31 14:37:23 2014 +0200
location-entry: Make CTRL+l work when the completion menu is shown
When the completion popup menu is shown, it has an active keyboard grab
that prevents the key events from being handled by the window. Handle
the CTRL+l shortcut in the location entry to activate the entry when the
completion popup menu is visible.
https://bugzilla.gnome.org/show_bug.cgi?id=611435
lib/widgets/ephy-location-entry.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 058c2b4..1d055a4 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -441,16 +441,25 @@ editable_changed_cb (GtkEditable *editable,
static gboolean
entry_key_press_cb (GtkEntry *entry,
GdkEventKey *event,
- EphyLocationEntry *lentry)
+ EphyLocationEntry *location_entry)
{
guint state = event->state & gtk_accelerator_get_default_mod_mask ();
+
if (event->keyval == GDK_KEY_Escape && state == 0)
{
- ephy_location_entry_reset_internal (lentry, TRUE);
+ ephy_location_entry_reset_internal (location_entry, TRUE);
/* don't return TRUE since we want to cancel the autocompletion popup too */
}
+ if (event->keyval == GDK_KEY_l && state == GDK_CONTROL_MASK)
+ {
+ /* Make sure the location is activated on CTRL+l even when the
+ * completion popup is shown and have an active keyboard grab.
+ */
+ ephy_location_entry_activate (location_entry);
+ }
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]