summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-01-08 20:43:13 +0100
committerraveit65 <[email protected]>2017-02-17 12:28:22 +0100
commita925031c13621b333be3e16bda2006fef75592c8 (patch)
tree19187d44f9b5a8ccae7c82e3bef5003d3a042986
parent99f4ac126c7bd12bc29d9c47fa90bb8b1a37301d (diff)
downloadmate-control-center-a925031c13621b333be3e16bda2006fef75592c8.tar.bz2
mate-control-center-a925031c13621b333be3e16bda2006fef75592c8.tar.xz
Fontviewer: Replace deprecated method with main context invocation
taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=beb0a7c
-rw-r--r--font-viewer/font-model.c8
-rw-r--r--font-viewer/sushi-font-loader.c4
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;
}