summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-04-20 19:58:06 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-04-26 17:59:42 +0200
commit15e00759c74a6bb72bffe2a6d7f75c83914c11c5 (patch)
tree793c4a97120e19a9c540aa282fd530ae3ef0c9f2 /examples
parentba7849960e5e3447884f92b58e899aa5db0f0565 (diff)
downloadgtk+-15e00759c74a6bb72bffe2a6d7f75c83914c11c5.tar.gz
eventcontrollerkey: Port to new API model
Diffstat (limited to 'examples')
-rw-r--r--examples/search-bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/search-bar.c b/examples/search-bar.c
index 2dfeddf413..136354ac84 100644
--- a/examples/search-bar.c
+++ b/examples/search-bar.c
@@ -41,10 +41,11 @@ activate_cb (GtkApplication *app,
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (search_bar), GTK_ENTRY (entry));
- controller = gtk_event_controller_key_new (window);
+ controller = gtk_event_controller_key_new ();
g_object_set_data_full (G_OBJECT (window), "controller", controller, g_object_unref);
g_signal_connect (controller, "key-pressed",
G_CALLBACK (window_key_pressed), search_bar);
+ gtk_widget_add_controller (window, controller);
}
gint