[gnome-photos/wip/rishi/collection: 14/16] offset-controller: Tag the Query



commit d666eb17d78352378c47fa24ea068803269f429d
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 4 17:16:30 2017 +0200

    offset-controller: Tag the Query

 src/photos-offset-controller.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-offset-controller.c b/src/photos-offset-controller.c
index 226760b..1c30041 100644
--- a/src/photos-offset-controller.c
+++ b/src/photos-offset-controller.c
@@ -271,15 +271,21 @@ photos_offset_controller_reset_count (PhotosOffsetController *self)
 {
   PhotosOffsetControllerPrivate *priv;
   PhotosQuery *query;
+  const gchar *type_name;
+  gchar *tag = NULL;
 
   priv = photos_offset_controller_get_instance_private (self);
 
   if (G_UNLIKELY (priv->queue == NULL))
-    return;
+    goto out;
 
   query = PHOTOS_OFFSET_CONTROLLER_GET_CLASS (self)->get_query (self);
   g_return_if_fail (query != NULL);
 
+  type_name = G_OBJECT_TYPE_NAME (self);
+  tag = g_strdup_printf ("%s: %s", type_name, G_STRFUNC);
+  photos_query_set_tag (query, tag);
+
   photos_tracker_queue_select (priv->queue,
                                query,
                                NULL,
@@ -287,6 +293,9 @@ photos_offset_controller_reset_count (PhotosOffsetController *self)
                                g_object_ref (self),
                                g_object_unref);
   photos_query_free (query);
+
+ out:
+  g_free (tag);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]