[gtk/shortcuts-rebased-again: 37/129] scale: Port bindings to use shortcuts
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 37/129] scale: Port bindings to use shortcuts
- Date: Sat, 22 Jun 2019 13:54:23 +0000 (UTC)
commit faed9cae58b008226c29edfc863156201501bb5f
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 887af19200..c1fa02853a 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"
@@ -621,10 +620,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)
@@ -648,7 +648,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;
@@ -741,8 +740,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]