[gnome-photos/wip/rishi/tracker-notifier: 2/5] application, tracker-queue: Set the Tracker domain earlier on startup




commit a9b94ea5ec00e8e5bcd4b11497f8a0334b832347
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Mar 4 18:23:15 2021 +0100

    application, tracker-queue: Set the Tracker domain earlier on startup
    
    A subsequent commit will port away from PhotosTrackerChangeMonitor to
    TrackerNotifier. Since TrackerNotifier doesn't use PhotosTrackerQueue,
    the Tracker domain needs to be set separately and before a
    TrackerNotifier has been instantiated.
    
    Note that TrackerNotifier will be used inside PhotosItemManager, which
    is instantiated when a PhotosSearchContextState is created.
    
    https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/166

 src/photos-application.c   | 2 ++
 src/photos-tracker-queue.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 0393f68a..3b01e248 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -38,6 +38,7 @@
 #include <grilo.h>
 #include <handy.h>
 #include <libtracker-control/tracker-control.h>
+#include <tracker-sparql.h>
 
 #include "photos-application.h"
 #include "photos-base-item.h"
@@ -3059,6 +3060,7 @@ photos_application_init (PhotosApplication *self)
   textdomain (GETTEXT_PACKAGE);
 
   g_set_application_name (_("Photos"));
+  tracker_sparql_connection_set_domain ("org.gnome.Photos");
 
   photos_utils_ensure_builtins ();
 
diff --git a/src/photos-tracker-queue.c b/src/photos-tracker-queue.c
index 76d25d5d..6ac829cd 100644
--- a/src/photos-tracker-queue.c
+++ b/src/photos-tracker-queue.c
@@ -290,8 +290,6 @@ photos_tracker_queue_initable_init (GInitable *initable, GCancellable *cancellab
 
   g_assert_no_error (self->initialization_error);
 
-  tracker_sparql_connection_set_domain ("org.gnome.Photos");
-
   self->connection = tracker_sparql_connection_get (cancellable, &self->initialization_error);
   if (G_UNLIKELY (self->initialization_error != NULL))
     goto out;


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