[gnome-photos/wip/rishi/imageview: 9/9] base-item: Delay finishing process
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/imageview: 9/9] base-item: Delay finishing process
- Date: Thu, 4 Feb 2016 12:43:50 +0000 (UTC)
commit 44a150471666cfeb9b46baaba2c8c5ee9e30b2bd
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 da2b68c..9014ea8 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 (self->priv->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]