From a925031c13621b333be3e16bda2006fef75592c8 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 8 Jan 2017 20:43:13 +0100 Subject: Fontviewer: Replace deprecated method with main context invocation taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=beb0a7c --- font-viewer/font-model.c | 8 ++++---- font-viewer/sushi-font-loader.c | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/font-viewer/font-model.c b/font-viewer/font-model.c index c0928203..17c75bd5 100644 --- a/font-viewer/font-model.c +++ b/font-viewer/font-model.c @@ -276,8 +276,8 @@ ensure_thumbnails_job (GIOSchedulerJob *job, g_clear_object (&thumb_file); g_clear_object (&info); - g_io_scheduler_job_send_to_mainloop_async (job, one_thumbnail_done, - thumb_info, NULL); + g_main_context_invoke (NULL, one_thumbnail_done, + thumb_info); } g_list_free (thumb_infos); @@ -400,8 +400,8 @@ load_font_infos (GIOSchedulerJob *job, if (g_cancellable_is_cancelled (cancellable)) load_font_infos_data_free (data); else - g_io_scheduler_job_send_to_mainloop_async (job, font_infos_loaded, - data, load_font_infos_data_free); + g_main_context_invoke_full (NULL, G_PRIORITY_DEFAULT, font_infos_loaded, + data, load_font_infos_data_free); return FALSE; } diff --git a/font-viewer/sushi-font-loader.c b/font-viewer/sushi-font-loader.c index 1991a861..de6d1d99 100644 --- a/font-viewer/sushi-font-loader.c +++ b/font-viewer/sushi-font-loader.c @@ -141,9 +141,7 @@ font_load_job (GIOSchedulerJob *sched_job, if (error != NULL) g_simple_async_result_take_error (job->result, error); - g_io_scheduler_job_send_to_mainloop_async (sched_job, - font_load_job_callback, - job, NULL); + g_main_context_invoke (NULL, font_load_job_callback, job); return FALSE; } -- cgit v1.2.1