summaryrefslogtreecommitdiff
path: root/gtk/gtksearchentry.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-03-03 22:14:19 -0500
committerMatthias Clasen <mclasen@redhat.com>2019-03-03 22:25:52 -0500
commit02318dbda7f983f48958e510c925cd2af3ffd5ad (patch)
tree72d318bb1039b5de1ce06a94e59b45fe1bf6e7be /gtk/gtksearchentry.c
parentbed4c68041fb77a683c29ec5a5e6ddddb441058c (diff)
downloadgtk+-02318dbda7f983f48958e510c925cd2af3ffd5ad.tar.gz
entries: Fix mnemonic activation
Since entries are no longer can-focus, the default mnemonic_activate handler refuses to act on them.
Diffstat (limited to 'gtk/gtksearchentry.c')
-rw-r--r--gtk/gtksearchentry.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index a227956e93..eeeb618df5 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -259,6 +259,18 @@ gtk_search_entry_grab_focus (GtkWidget *widget)
}
static void
+gtk_search_entry_mnemonic_activate (GtkWidget *widget,
+ gboolean group_cycling)
+{
+ GtkSearchEntry *entry = GTK_SEARCH_ENTRY (widget);
+ GtkSearchEntryPrivate *priv = gtk_search_entry_get_instance_private (entry);
+
+ gtk_widget_grab_focus (priv->entry);
+
+ return TRUE;
+}
+
+static void
gtk_search_entry_class_init (GtkSearchEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -273,6 +285,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
widget_class->size_allocate = gtk_search_entry_size_allocate;
widget_class->get_accessible = gtk_search_entry_get_accessible;
widget_class->grab_focus = gtk_search_entry_grab_focus;
+ widget_class->mnemonic_activate = gtk_search_entry_mnemonic_activate;
klass->stop_search = gtk_search_entry_stop_search;