diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-02 15:51:47 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-03 12:06:58 +0100 |
commit | c655759cefa56efdb0cb943bb5dada3ff75a963c (patch) | |
tree | ef945ea7131b6419d00828fa8661d86691563d83 /tests/testassistant.c | |
parent | 334acbfc39cc08869932ec046e4d13e6c4b64be6 (diff) | |
download | gtk+-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 'tests/testassistant.c')
-rw-r--r-- | tests/testassistant.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testassistant.c b/tests/testassistant.c index d0331071c5..6b2ae17c04 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -136,7 +136,7 @@ prepare_callback (GtkWidget *widget, GtkWidget *page) { gtk_assistant_set_page_complete (GTK_ASSISTANT (widget), page, FALSE); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (page), 0.0); - gdk_threads_add_timeout (300, (GSourceFunc) progress_timeout, widget); + g_timeout_add (300, (GSourceFunc) progress_timeout, widget); } else g_print ("prepare: %d\n", gtk_assistant_get_current_page (GTK_ASSISTANT (widget))); |