GtkSpinButton: Don't leak the gestures

This commit is contained in:
Matthias Clasen
2014-05-01 22:05:42 -04:00
committed by Carlos Garnacho
parent c6c41262b6
commit 93b7883372

View File

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