summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystemmodel.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/gtkfilesystemmodel.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/gtkfilesystemmodel.c')
-rw-r--r--gtk/gtkfilesystemmodel.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 386188d108..7350a4aeb8 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -1146,11 +1146,10 @@ gtk_file_system_model_got_files (GObject *object, GAsyncResult *res, gpointer da
if (model->dir_thaw_source == 0)
{
freeze_updates (model);
- model->dir_thaw_source = gdk_threads_add_timeout_full (IO_PRIORITY + 1,
- 50,
- thaw_func,
- model,
- NULL);
+ model->dir_thaw_source = g_timeout_add_full (IO_PRIORITY + 1, 50,
+ thaw_func,
+ model,
+ NULL);
g_source_set_name_by_id (model->dir_thaw_source, "[gtk+] thaw_func");
}