From 1e6eb1f8b94ad10f30678285860dc24877bbbac3 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 10 Mar 2018 18:05:57 +0100 Subject: draggesture: Port to new API model --- gtk/gtkcalendar.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gtk/gtkcalendar.c') diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 704ce1808d..a4d3b930ca 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -249,7 +249,6 @@ struct _GtkCalendarPrivate gint detail_width_chars; gint detail_overflow[6]; - GtkGesture *drag_gesture; GtkEventController *scroll_controller; GtkEventController *key_controller; }; @@ -677,9 +676,10 @@ gtk_calendar_init (GtkCalendar *calendar) g_signal_connect (gesture, "released", G_CALLBACK (gtk_calendar_button_release), calendar); gtk_widget_add_controller (GTK_WIDGET (calendar), GTK_EVENT_CONTROLLER (gesture)); - priv->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (calendar)); - g_signal_connect (priv->drag_gesture, "drag-begin", G_CALLBACK (gtk_calendar_drag_begin), calendar); - g_signal_connect (priv->drag_gesture, "drag-update", G_CALLBACK (gtk_calendar_drag_update), calendar); + gesture = gtk_gesture_drag_new (); + g_signal_connect (gesture, "drag-begin", G_CALLBACK (gtk_calendar_drag_begin), calendar); + g_signal_connect (gesture, "drag-update", G_CALLBACK (gtk_calendar_drag_update), calendar); + gtk_widget_add_controller (GTK_WIDGET (calendar), GTK_EVENT_CONTROLLER (gesture)); priv->scroll_controller = gtk_event_controller_scroll_new (GTK_WIDGET (calendar), @@ -1333,7 +1333,6 @@ gtk_calendar_finalize (GObject *object) { GtkCalendarPrivate *priv = GTK_CALENDAR (object)->priv; - g_object_unref (priv->drag_gesture); g_object_unref (priv->scroll_controller); g_object_unref (priv->key_controller); -- cgit v1.2.1