scale: Port bindings to use shortcuts

This commit is contained in:
Benjamin Otte 2018-08-12 15:53:45 +02:00 committed by Matthias Clasen
parent 8752f613d7
commit cd7e9dcc27

View File

@ -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);