[gnome-photos] tracker-controller: Tag the Query



commit c63bd61c041ac865dfaf32da143352c5fe9f3cf6
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 4 17:20:20 2017 +0200

    tracker-controller: Tag the Query
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787833

 src/photos-tracker-controller.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 79c82e7..9090340 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -276,6 +276,8 @@ static void
 photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
 {
   PhotosTrackerControllerPrivate *priv;
+  const gchar *type_name;
+  gchar *tag = NULL;
 
   priv = photos_tracker_controller_get_instance_private (self);
 
@@ -285,13 +287,17 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
   priv->current_query = PHOTOS_TRACKER_CONTROLLER_GET_CLASS (self)->get_query (self);
   g_return_if_fail (priv->current_query != NULL);
 
+  type_name = G_OBJECT_TYPE_NAME (self);
+  tag = g_strdup_printf ("%s: %s", type_name, G_STRFUNC);
+  photos_query_set_tag (priv->current_query, tag);
+
   g_object_unref (priv->cancellable);
   priv->cancellable = g_cancellable_new ();
 
   if (G_UNLIKELY (priv->queue == NULL))
     {
       photos_tracker_controller_query_error (self, priv->queue_error);
-      return;
+      goto out;
     }
 
   photos_tracker_queue_select (priv->queue,
@@ -300,6 +306,9 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
                                photos_tracker_controller_query_executed,
                                g_object_ref (self),
                                g_object_unref);
+
+ out:
+  g_free (tag);
 }
 
 


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