summaryrefslogtreecommitdiff
path: root/gtk/gtksearchentry.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-12 15:44:45 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-25 22:36:03 -0400
commitdb525ef213c48e9919aa341ea8a312200e176d7c (patch)
treed45e4f0c6357b37002f7696776e85276e1ebb531 /gtk/gtksearchentry.c
parent3f00e42ec9981e6d8ce24ac75276a962a8916b21 (diff)
downloadgtk+-db525ef213c48e9919aa341ea8a312200e176d7c.tar.gz
searchentry: Port bindings to use shortcuts
Diffstat (limited to 'gtk/gtksearchentry.c')
-rw-r--r--gtk/gtksearchentry.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index 535aaf946a..5d92aeebba 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -30,7 +30,6 @@
#include "gtksearchentryprivate.h"
#include "gtkaccessible.h"
-#include "gtkbindings.h"
#include "gtkeditable.h"
#include "gtkboxlayout.h"
#include "gtkgestureclick.h"
@@ -267,7 +266,6 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GtkBindingSet *binding_set;
object_class->finalize = gtk_search_entry_finalize;
object_class->get_property = gtk_search_entry_get_property;
@@ -401,14 +399,18 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
NULL,
G_TYPE_NONE, 0);
- binding_set = gtk_binding_set_by_class (klass);
-
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
- "next-match", 0);
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
- "previous-match", 0);
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
- "stop-search", 0);
+ gtk_widget_class_add_binding_signal (widget_class,
+ GDK_KEY_g, GDK_CONTROL_MASK,
+ "next-match",
+ NULL);
+ gtk_widget_class_add_binding_signal (widget_class,
+ GDK_KEY_g, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+ "previous-match",
+ NULL);
+ gtk_widget_class_add_binding_signal (widget_class,
+ GDK_KEY_Escape, 0,
+ "stop-search",
+ NULL);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_ENTRY_ACCESSIBLE);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);