summaryrefslogtreecommitdiff
path: root/gtk/gtkspinbutton.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-02 15:51:47 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-03 12:06:58 +0100
commitc655759cefa56efdb0cb943bb5dada3ff75a963c (patch)
treeef945ea7131b6419d00828fa8661d86691563d83 /gtk/gtkspinbutton.c
parent334acbfc39cc08869932ec046e4d13e6c4b64be6 (diff)
downloadgtk+-c655759cefa56efdb0cb943bb5dada3ff75a963c.tar.gz
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
Diffstat (limited to 'gtk/gtkspinbutton.c')
-rw-r--r--gtk/gtkspinbutton.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index af5784bfd3..1f28ceef2b 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -775,7 +775,7 @@ start_spinning (GtkSpinButton *spin,
{
priv->timer_step = step;
priv->need_timer = TRUE;
- priv->timer = gdk_threads_add_timeout (TIMEOUT_INITIAL,
+ priv->timer = g_timeout_add (TIMEOUT_INITIAL,
(GSourceFunc) gtk_spin_button_timer,
(gpointer) spin);
g_source_set_name_by_id (priv->timer, "[gtk+] gtk_spin_button_timer");
@@ -1153,9 +1153,9 @@ gtk_spin_button_timer (GtkSpinButton *spin_button)
if (priv->need_timer)
{
priv->need_timer = FALSE;
- priv->timer = gdk_threads_add_timeout (TIMEOUT_REPEAT,
- (GSourceFunc) gtk_spin_button_timer,
- (gpointer) spin_button);
+ priv->timer = g_timeout_add (TIMEOUT_REPEAT,
+ (GSourceFunc) gtk_spin_button_timer,
+ spin_button);
g_source_set_name_by_id (priv->timer, "[gtk+] gtk_spin_button_timer");
}
else