diff options
author | Benjamin Otte <otte@redhat.com> | 2018-08-12 15:50:45 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-18 23:00:50 -0400 |
commit | 38032093305118f252901efe7cd06e2b0be8ff2d (patch) | |
tree | 462dd1716b8dcbffeb0f05d453aa9534e1a1d40d /gtk/gtkscalebutton.c | |
parent | fb7d1095d14791b6a84b6efd44838c23f976897c (diff) | |
download | gtk+-38032093305118f252901efe7cd06e2b0be8ff2d.tar.gz |
scalebutton: Port bindings to use shortcuts
Diffstat (limited to 'gtk/gtkscalebutton.c')
-rw-r--r-- | gtk/gtkscalebutton.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index 3b41e6a64c..76c2173d49 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -37,7 +37,6 @@ #include "gtkscalebutton.h" #include "gtkadjustment.h" -#include "gtkbindings.h" #include "gtkbox.h" #include "gtkbuttonprivate.h" #include "gtkimage.h" @@ -171,7 +170,6 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass); - GtkBindingSet *binding_set; gobject_class->constructed = gtk_scale_button_constructed; gobject_class->finalize = gtk_scale_button_finalize; @@ -298,20 +296,30 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass) G_TYPE_NONE, 0); /* Key bindings */ - binding_set = gtk_binding_set_by_class (widget_class); - - gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0, - "popup", 0); - gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Space, 0, - "popup", 0); - gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0, - "popup", 0); - gtk_binding_entry_add_signal (binding_set, GDK_KEY_ISO_Enter, 0, - "popup", 0); - gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Enter, 0, - "popup", 0); - gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, - "popdown", 0); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_space, 0, + "popup", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_KP_Space, 0, + "popup", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_Return, 0, + "popup", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_ISO_Enter, 0, + "popup", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_KP_Enter, 0, + "popup", + NULL); + gtk_widget_class_add_binding_signal (widget_class, + GDK_KEY_Escape, 0, + "popdown", + NULL); /* Bind class to template */ |