[gnome-music/wip/mschraal/core] coremodel: Add song search model



commit 918261f3f0d4abe147e761ea7ac09cc12add1a32
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Jun 30 11:45:28 2019 +0200

    coremodel: Add song search model
    
    And remove unused selection model.

 gnomemusic/coremodel.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index 8a56d804..0a2958e4 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -54,21 +54,13 @@ class CoreModel(GObject.GObject):
         self._playlist_model = Gio.ListStore.new(CoreSong)
         self._playlist_model_sort = Gfm.SortListModel.new(self._playlist_model)
 
-        self._selection_model = Dazzle.ListModelFilter.new(self._model)
-        self._selection_model.set_filter_func(self._filter_selected)
-
-        self._album_store = None
+        self._song_search_model = Dazzle.ListModelFilter.new(self._model)
 
         print("PLAYLIST_MODEL", self._playlist_model)
         self._grilo = CoreGrilo(
             self, self._model, self._album_model, self._artist_model,
             self._coreselection)
 
-        self._selection_model.connect("items-changed", self._on_sel_changed)
-
-    def _on_sel_changed(self, model, position, added, removed):
-        print("selection changed", model.get_n_items())
-
     def _filter_selected(self, coresong):
         return coresong.props.selected
 
@@ -189,3 +181,6 @@ class CoreModel(GObject.GObject):
 
     def get_songs_model(self):
         return self._songliststore
+
+    def get_songs_search_model(self):
+        return self._song_search_model


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