[grilo-plugins] Account for grl_tracker_per_device_source while looking up the GrlTrackerSource



commit 18ee3f35540d8541b4308851eee2519ca8e03fb9
Author: Mohammed Hassan <mohammed hassan jollamobile com>
Date:   Thu Jan 17 18:10:54 2013 +0200

    Account for grl_tracker_per_device_source while looking up the GrlTrackerSource
    
    We will never find a GrlTrackerSource corresponding to any tracker data source if we are
    using a catch all (not per device) source. In that case we simply try to find the one
    and only source we have and use it for notifications.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691717

 src/tracker/grl-tracker-source-notif.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker/grl-tracker-source-notif.c b/src/tracker/grl-tracker-source-notif.c
index 1f5a571..6bf122a 100644
--- a/src/tracker/grl-tracker-source-notif.c
+++ b/src/tracker/grl-tracker-source-notif.c
@@ -214,7 +214,10 @@ tracker_evt_update_orphan_item_cb (GObject              *object,
 
   GRL_DEBUG ("\tOrphan item: id=%u datasource=%s", id, datasource);
 
-  if (datasource)
+  if (!grl_tracker_per_device_source)
+    source = grl_tracker_source_find ("");
+
+  if (!source && datasource)
     source = grl_tracker_source_find (datasource);
 
   if (source && GRL_IS_TRACKER_SOURCE (source)) {



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