diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-10 18:05:57 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-26 17:59:42 +0200 |
commit | 1e6eb1f8b94ad10f30678285860dc24877bbbac3 (patch) | |
tree | eef4b5f579a657072967e7f7dd047494af5add1d /gtk/gtkcalendar.c | |
parent | bf82149271b4f6bf6379b22eeea191dffe6823dd (diff) | |
download | gtk+-1e6eb1f8b94ad10f30678285860dc24877bbbac3.tar.gz |
draggesture: Port to new API model
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r-- | gtk/gtkcalendar.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); |