[gnome-photos/wip/rishi/imageview: 5/5] base-item: Delay finishing process
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/imageview: 5/5] base-item: Delay finishing process
- Date: Tue, 17 Jan 2017 05:59:54 +0000 (UTC)
commit a5ffec5f451f1f4a1ca2ce33ca7f420102103cbb
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jan 17 06:58:09 2017 +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 cf0113e..eb8c2e6 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1159,6 +1159,21 @@ photos_base_item_pipeline_is_edited_load (GObject *source_object, GAsyncResult *
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 out;
+
+ g_task_return_boolean (task, TRUE);
+
+ out:
+ return G_SOURCE_REMOVE;
+}
+
+
+static gboolean
photos_base_item_process_idle (gpointer user_data)
{
GTask *task = G_TASK (user_data);
@@ -1172,7 +1187,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]