[grilo-plugins/wip/carlosg/tracker3: 43/48] tracker3: Listen to notifications from tracker-miner-fs




commit 5f1134611549487e539ba96b262a397e8ae47b00
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jun 14 20:33:15 2020 +0200

    tracker3: Listen to notifications from tracker-miner-fs
    
    This should be added explicitly, just in case the connection is local
    (and thus does not listen to events from tracker-miner-fs bus name by
    default).

 src/tracker3/grl-tracker-source-notif.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/tracker3/grl-tracker-source-notif.c b/src/tracker3/grl-tracker-source-notif.c
index f86f7418..59b76c27 100644
--- a/src/tracker3/grl-tracker-source-notif.c
+++ b/src/tracker3/grl-tracker-source-notif.c
@@ -174,9 +174,19 @@ static void
 grl_tracker_source_notify_constructed (GObject *object)
 {
   GrlTrackerSourceNotify *self = GRL_TRACKER_SOURCE_NOTIFY (object);
+  GDBusConnection *bus_connection;
 
   self->notifier =
     tracker_sparql_connection_create_notifier (self->connection);
+
+  bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+  tracker_notifier_signal_subscribe (self->notifier,
+                                     bus_connection,
+                                     "org.freedesktop.Tracker3.Miner.Files",
+                                     NULL,
+                                     NULL);
+  g_object_unref (bus_connection);
+
   self->events_signal_id =
     g_signal_connect_swapped (self->notifier, "events",
                               G_CALLBACK (notifier_event_cb), object);


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