[evolution/wip/webkit2] [backup-restore] Replace deprecated GIOScheduler functions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] [backup-restore] Replace deprecated GIOScheduler functions
- Date: Wed, 24 Feb 2016 13:54:59 +0000 (UTC)
commit af39dd7f8dca55f0f1b31dc6a147afb4adf35ff9
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 7 16:38:27 2015 +0200
[backup-restore] Replace deprecated GIOScheduler functions
modules/backup-restore/evolution-backup-tool.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/modules/backup-restore/evolution-backup-tool.c b/modules/backup-restore/evolution-backup-tool.c
index 9604513..840cee1 100644
--- a/modules/backup-restore/evolution-backup-tool.c
+++ b/modules/backup-restore/evolution-backup-tool.c
@@ -780,10 +780,11 @@ finish_job (gpointer user_data)
return FALSE;
}
-static gboolean
-start_job (GIOSchedulerJob *job,
- GCancellable *cancellable,
- gpointer user_data)
+static void
+start_job (GTask *task,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable *cancellable)
{
if (backup_op)
backup (bk_file, cancellable);
@@ -792,10 +793,7 @@ start_job (GIOSchedulerJob *job,
else if (check_op)
check (chk_file, NULL); /* not cancellable */
- g_io_scheduler_job_send_to_mainloop_async (
- job, finish_job, NULL, (GDestroyNotify) NULL);
-
- return FALSE;
+ g_main_context_invoke (NULL, finish_job, NULL);
}
static void
@@ -838,6 +836,7 @@ gint
main (gint argc,
gchar **argv)
{
+ GTask *task;
GCancellable *cancellable;
gchar *file = NULL, *oper = NULL;
const gchar *title = NULL;
@@ -1029,10 +1028,9 @@ main (gint argc,
(GDestroyNotify) g_object_unref);
}
- g_io_scheduler_push_job (
- start_job, NULL,
- (GDestroyNotify) NULL,
- G_PRIORITY_DEFAULT, cancellable);
+ task = g_task_new (cancellable, cancellable, NULL, NULL);
+ g_task_run_in_thread (task, start_job);
+ g_object_unref (task);
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]