[gnome-photos] base-item: Simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Simplify code
- Date: Wed, 30 Dec 2015 18:02:15 +0000 (UTC)
commit d77eaedd996e38154ec0455bf96b3161109a5824
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 29 11:07:14 2015 +0100
base-item: Simplify code
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 a99d7e4..b5657e7 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -946,22 +946,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]