diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-09 06:14:59 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-26 17:59:42 +0200 |
commit | 4ddc94b293504b56c0106b0177c36c8efd2d3a57 (patch) | |
tree | b620c608c025e287685a04afa8429d5541e12274 /gtk/gtkrange.c | |
parent | 71991270b047c66e7c14a65aaa70703527c978cf (diff) | |
download | gtk+-4ddc94b293504b56c0106b0177c36c8efd2d3a57.tar.gz |
multipressgesture: Port to new API model
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index b1d0278d78..f1a6acc179 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -574,13 +574,14 @@ gtk_range_init (GtkRange *range) g_signal_connect (priv->drag_gesture, "drag-update", G_CALLBACK (gtk_range_drag_gesture_update), range); - priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (range)); + priv->multipress_gesture = gtk_gesture_multi_press_new (); gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0); - gtk_gesture_group (priv->drag_gesture, priv->multipress_gesture); g_signal_connect (priv->multipress_gesture, "pressed", G_CALLBACK (gtk_range_multipress_gesture_pressed), range); g_signal_connect (priv->multipress_gesture, "released", G_CALLBACK (gtk_range_multipress_gesture_released), range); + gtk_widget_add_controller (GTK_WIDGET (range), GTK_EVENT_CONTROLLER (priv->multipress_gesture)); + gtk_gesture_group (priv->drag_gesture, priv->multipress_gesture); priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (range)); g_object_set (priv->long_press_gesture, "delay-factor", 2.0, NULL); @@ -1292,7 +1293,6 @@ gtk_range_finalize (GObject *object) GtkRangePrivate *priv = gtk_range_get_instance_private (range); g_clear_object (&priv->drag_gesture); - g_clear_object (&priv->multipress_gesture); g_clear_object (&priv->long_press_gesture); g_clear_object (&priv->scroll_controller); g_clear_object (&priv->key_controller); |