File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
3131
3232 repeat_button = new Gtk .Button ();
3333
34- ListModel list_model;
35- search_bar = new SearchBar (playback_manager. queue_liststore, out list_model);
34+ search_bar = new SearchBar (playback_manager. queue_liststore);
3635
3736 search_revealer = new Gtk .Revealer () {
3837 child = search_bar
@@ -60,7 +59,7 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
6059 icon = new ThemedIcon ("edit -find -symbolic ")
6160 };
6261
63- selection_model = new Gtk .SingleSelection (list_model );
62+ selection_model = new Gtk .SingleSelection (search_bar . filter_model );
6463
6564 var factory = new Gtk .SignalListItemFactory ();
6665
Original file line number Diff line number Diff line change @@ -10,17 +10,16 @@ public class Music.SearchBar : Granite.Bin {
1010
1111 public Gtk . SearchEntry search_entry { get ; private set ; }
1212
13- private Gtk . StringFilter filter;
14- private Gtk . FilterListModel filter_model;
15-
1613 /**
17- * @param new_model the new model with the search applied. Make sure to use this one in further UI
14+ * The new model with the search applied. Make sure to use this one in further UI
1815 * instead of the old given model.
1916 */
20- public SearchBar (ListModel list_model , out ListModel new_model ) {
21- Object (list_model: list_model);
17+ public Gtk . FilterListModel filter_model { get ; private set ; }
2218
23- new_model = filter_model;
19+ private Gtk . StringFilter filter;
20+
21+ public SearchBar (ListModel list_model ) {
22+ Object (list_model: list_model);
2423 }
2524
2625 construct {
You can’t perform that action at this time.
0 commit comments