[gtk/wip/ebassi/shortcut: 208/267] scale: Port bindings to use shortcuts



commit b9c95aeb269d96e85c6b628465407970ec552672
Author: Benjamin Otte <otte redhat com>
Date:   Sun Aug 12 15:53:45 2018 +0200

    scale: Port bindings to use shortcuts

 gtk/gtkscale.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 918ecb3bbb..b821045e9e 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -28,7 +28,6 @@
 #include "gtkscale.h"
 
 #include "gtkadjustment.h"
-#include "gtkbindings.h"
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
 #include "gtkgizmoprivate.h"
@@ -623,10 +622,11 @@ gtk_scale_size_allocate (GtkWidget *widget,
     }
 }
 
-#define add_slider_binding(binding_set, keyval, mask, scroll)              \
-  gtk_binding_entry_add_signal (binding_set, keyval, mask,                 \
-                                I_("move-slider"), 1, \
-                                GTK_TYPE_SCROLL_TYPE, scroll)
+#define add_slider_binding(binding_set, keyval, mask, scroll)        \
+  gtk_widget_class_add_binding_signal (widget_class,                 \
+                                       keyval, mask,                 \
+                                       I_("move-slider"),            \
+                                       "(i)", scroll)
 
 static void
 gtk_scale_value_changed (GtkRange *range)
@@ -650,7 +650,6 @@ gtk_scale_class_init (GtkScaleClass *class)
   GObjectClass   *gobject_class;
   GtkWidgetClass *widget_class;
   GtkRangeClass  *range_class;
-  GtkBindingSet  *binding_set;
   
   gobject_class = G_OBJECT_CLASS (class);
   range_class = (GtkRangeClass*) class;
@@ -706,8 +705,6 @@ gtk_scale_class_init (GtkScaleClass *class)
    * blind users etc. don't care about scale orientation.
    */
   
-  binding_set = gtk_binding_set_by_class (class);
-
   add_slider_binding (binding_set, GDK_KEY_Left, 0,
                       GTK_SCROLL_STEP_LEFT);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]