diff --git a/src/play_queue.blp b/src/play_queue.blp index e36abfc..4f5d971 100644 --- a/src/play_queue.blp +++ b/src/play_queue.blp @@ -15,6 +15,10 @@ template $WaveletPlayQueue: Adw.NavigationPage { activate => $on_song_activate (); + model: Gtk.NoSelection { + model: bind template.songs; + }; + factory: BuilderListItemFactory { template ListItem { child: Label { diff --git a/src/play_queue.vala b/src/play_queue.vala index b3c7fb7..63953ea 100644 --- a/src/play_queue.vala +++ b/src/play_queue.vala @@ -20,9 +20,7 @@ [GtkTemplate (ui = "/eu/callcc/Wavelet/play_queue.ui")] public class Wavelet.PlayQueue : Adw.NavigationPage { - [GtkChild] private unowned Gtk.ListView list_view; - - private ListStore songs; + public ListStore songs { get; private set; } // this is the index of the song that will play on next on_stream_start private uint next_stream_index; @@ -34,8 +32,6 @@ public class Wavelet.PlayQueue : Adw.NavigationPage { construct { this.songs = new ListStore (typeof (Song)); this.next_stream_index = 0; - - this.list_view.model = new Gtk.NoSelection (this.songs); } public void clear () {