summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkspinbutton.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 976b8c6212..fb0c40b357 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -751,6 +751,14 @@ gtk_spin_button_finalize (GObject *object)
if (priv->up_panel_context)
g_object_unref (priv->up_panel_context);
+ gtk_widget_remove_controller (GTK_WIDGET (spin_button),
+ GTK_EVENT_CONTROLLER (priv->long_press_gesture));
+ g_object_unref (priv->long_press_gesture);
+
+ gtk_widget_add_controller (GTK_WIDGET (spin_button),
+ GTK_EVENT_CONTROLLER (priv->swipe_gesture));
+ g_object_unref (priv->swipe_gesture);
+
G_OBJECT_CLASS (gtk_spin_button_parent_class)->finalize (object);
}