[gnome-photos] fetch-ids-job: Move some code around
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] fetch-ids-job: Move some code around
- Date: Wed, 22 Jun 2016 16:58:26 +0000 (UTC)
commit 390bd9aea7dfdf910aea69a3889c796e628bbacd
Author: Rafael Fonseca <r4f4rfs gmail com>
Date: Wed Apr 20 15:23:11 2016 +0200
fetch-ids-job: Move some code around
https://bugzilla.gnome.org/show_bug.cgi?id=764086
src/photos-fetch-ids-job.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-fetch-ids-job.c b/src/photos-fetch-ids-job.c
index 04ae40c..774f125 100644
--- a/src/photos-fetch-ids-job.c
+++ b/src/photos-fetch-ids-job.c
@@ -79,7 +79,6 @@ photos_fetch_ids_job_cursor_next (GObject *source_object, GAsyncResult *res, gpo
TrackerSparqlCursor *cursor = TRACKER_SPARQL_CURSOR (source_object);
GError *error;
gboolean success;
- const gchar *id;
error = NULL;
success = tracker_sparql_cursor_next_finish (cursor, res, &error);
@@ -89,14 +88,17 @@ photos_fetch_ids_job_cursor_next (GObject *source_object, GAsyncResult *res, gpo
g_error_free (error);
goto end;
}
- if(!success)
- goto end;
- id = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_URN, NULL);
- g_ptr_array_add (self->ids, g_strdup (id));
+ if (success)
+ {
+ const gchar *id;
+
+ id = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_URN, NULL);
+ g_ptr_array_add (self->ids, g_strdup (id));
- tracker_sparql_cursor_next_async (cursor, self->cancellable, photos_fetch_ids_job_cursor_next, self);
- return;
+ tracker_sparql_cursor_next_async (cursor, self->cancellable, photos_fetch_ids_job_cursor_next, self);
+ return;
+ }
end:
photos_fetch_ids_job_emit_callback (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]