[gnome-photos/wip/rishi/misc-fixes: 16/17] base-item: Simplify
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 16/17] base-item: Simplify
- Date: Tue, 29 Dec 2015 10:28:54 +0000 (UTC)
commit be6bfa372f557258a378a4e71c399bb17213420f
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 29 11:07:14 2015 +0100
base-item: Simplify
src/photos-base-item.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index a882696..8fc1bef 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -949,22 +949,18 @@ photos_base_item_process_idle (gpointer user_data)
{
GTask *task = G_TASK (user_data);
PhotosBaseItem *self;
- GCancellable *cancellable;
- gboolean result = FALSE;
self = PHOTOS_BASE_ITEM (g_task_get_source_object (task));
- cancellable = g_task_get_cancellable (task);
- if (g_cancellable_is_cancelled (cancellable))
+ if (g_task_return_error_if_cancelled (task))
goto done;
if (gegl_processor_work (self->priv->processor, NULL))
return G_SOURCE_CONTINUE;
- result = TRUE;
+ g_task_return_boolean (task, TRUE);
done:
- g_task_return_boolean (task, result);
return G_SOURCE_REMOVE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]