[gnome-music] searchbar: Add tracker to search sources as Local



commit e7dbdb84a23797e9330256198323986d97821a90
Author: Arnel Borja <arnelborja src gnome org>
Date:   Wed May 7 00:30:24 2014 +0800

    searchbar: Add tracker to search sources as Local
    
    Tracker gets added to the grilo sources late, so we have to manually
    add it. Remove filesystem since it is redundant and doesn't resolve
    metadata properly.

 gnomemusic/searchbar.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/searchbar.py b/gnomemusic/searchbar.py
index 6dbe6fd..123eb90 100644
--- a/gnomemusic/searchbar.py
+++ b/gnomemusic/searchbar.py
@@ -70,13 +70,12 @@ class SourceManager(BaseManager):
     @log
     def fill_in_values(self, model):
         if self.id == "source":
-            # First one should always be 'Filesystem'
-            src = grilo.sources['grl-filesystem']
-            self.values.append(["", "", self.label])
-            self.values.append([src.get_id(), src.get_name(), ""])
+            self.values.append(['', '', self.label])
+            self.values.append(['grl-tracker-source', _("Local"), ''])
             for key in grilo.sources:
                 source = grilo.sources[key]
-                if source.get_id() == 'grl-filesystem':
+                if source.get_id() == 'grl-filesystem' or \
+                   source.get_id() == 'grl-tracker-source':
                     continue
                 self.values.append([source.get_id(), source.get_name(), ""])
         super(SourceManager, self).fill_in_values(model)


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