[gnome-photos/wip/rishi/imageview2: 6/6] base-item: Delay finishing process
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/imageview2: 6/6] base-item: Delay finishing process
- Date: Mon, 16 Jan 2017 11:03:02 +0000 (UTC)
commit 46c8d1966fbb4eb09497764393472a44daf7f00f
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Feb 4 13:37:39 2016 +0100
base-item: Delay finishing process
src/photos-base-item.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 9998449..c43d89d 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -979,6 +979,21 @@ photos_base_item_pipeline_save_save (GObject *source_object, GAsyncResult *res,
static gboolean
+photos_base_item_process_complete_idle (gpointer user_data)
+{
+ GTask *task = G_TASK (user_data);
+
+ if (g_task_return_error_if_cancelled (task))
+ goto done;
+
+ g_task_return_boolean (task, TRUE);
+
+ done:
+ return G_SOURCE_REMOVE;
+}
+
+
+static gboolean
photos_base_item_process_idle (gpointer user_data)
{
GTask *task = G_TASK (user_data);
@@ -992,7 +1007,10 @@ photos_base_item_process_idle (gpointer user_data)
if (gegl_processor_work (processor, NULL))
return G_SOURCE_CONTINUE;
- g_task_return_boolean (task, TRUE);
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+ photos_base_item_process_complete_idle,
+ g_object_ref (task),
+ g_object_unref);
done:
return G_SOURCE_REMOVE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]