[gnome-music] Fixing Search dropdown to show the right default source



commit 7f9b3a6751228e1ab8c75a947607b11eb5f40a16
Author: Hapoofesgeli <Hapoofesgeli openmailbox org>
Date:   Tue Sep 8 00:33:09 2015 +0430

    Fixing Search dropdown to show the right default source
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754702

 gnomemusic/searchbar.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/searchbar.py b/gnomemusic/searchbar.py
index 2d0ad24..5c6d6f0 100644
--- a/gnomemusic/searchbar.py
+++ b/gnomemusic/searchbar.py
@@ -85,7 +85,8 @@ class BaseManager:
 
             # If selected values has first entry then it is a default value
             # No need to set the tag there
-            if selected_value[BaseModelColumns.ID] != self.values[1][BaseModelColumns.ID]:
+            if (selected_value[BaseModelColumns.ID] != 'search_all' and
+                    selected_value[BaseModelColumns.ID] != 'grl-tracker-source'):
                 self.entry.add_tag(self.tag)
                 self.tag.set_label(selected_value[BaseModelColumns.NAME])
             else:
@@ -113,6 +114,8 @@ class SourceManager(BaseManager):
         self.model = model
         super(SourceManager, self).fill_in_values(model)
 
+        super(SourceManager, self).set_active('grl-tracker-source')
+
     @log
     def add_new_source(self, klass, source):
         value = [source.get_id(), source.get_name(), '']


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