[gtk/gbsneto/shortcuts-rebased: 41/99] scale: Port bindings to use shortcuts
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gbsneto/shortcuts-rebased: 41/99] scale: Port bindings to use shortcuts
- Date: Mon, 13 May 2019 19:29:24 +0000 (UTC)
commit e55db0419daa253d5329c31d6671be3199c0c191
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 c57549486e..abc9c35b6a 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"
@@ -620,10 +619,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)
@@ -647,7 +647,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;
@@ -740,8 +739,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]