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



commit 7ee15e20e99d1253c86fec93ef5f5febeb48f48e
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 443f54e..c81f7da 100644
--- a/gnomemusic/searchbar.py
+++ b/gnomemusic/searchbar.py
@@ -81,7 +81,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:
@@ -106,6 +107,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]