From c655759cefa56efdb0cb943bb5dada3ff75a963c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 2 Feb 2018 15:51:47 +0100 Subject: Replace gdk_threads_add_timeout* with g_timeout_add() The main GDK thread lock is not portable and deprecated. The only reason why gdk_threads_add_timeout() and gdk_threads_add_timeout_full() exist is to allow invoking a callback with the GDK lock held, in case 3rd party libraries still use the deprecated gdk_threads_enter()/gdk_threads_leave() API. Since we're removing the GDK lock, and we're releasing a new major API, such code cannot exist any more; this means we can use the GLib API for installing timeout callbacks. https://bugzilla.gnome.org/show_bug.cgi?id=793124 --- gtk/gtkcalendar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk/gtkcalendar.c') diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 0899748f56..2d03959496 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -2486,10 +2486,10 @@ calendar_timer (gpointer data) if (priv->need_timer) { priv->need_timer = FALSE; - priv->timer = gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT_IDLE, + priv->timer = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, TIMEOUT_REPEAT * SCROLL_DELAY_FACTOR, (GSourceFunc) calendar_timer, - (gpointer) calendar, NULL); + calendar, NULL); g_source_set_name_by_id (priv->timer, "[gtk+] calendar_timer"); } else @@ -2510,10 +2510,10 @@ calendar_start_spinning (GtkCalendar *calendar, if (!priv->timer) { priv->need_timer = TRUE; - priv->timer = gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT_IDLE, + priv->timer = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, TIMEOUT_INITIAL, (GSourceFunc) calendar_timer, - (gpointer) calendar, NULL); + calendar, NULL); g_source_set_name_by_id (priv->timer, "[gtk+] calendar_timer"); } } -- cgit v1.2.1