From 71429fa5b4251efff7d12f0758ca53ce8445fa0a Mon Sep 17 00:00:00 2001 From: me Date: Sat, 12 Oct 2024 13:12:51 +0000 Subject: [PATCH] kill a child --- src/play_queue.blp | 4 ++++ src/play_queue.vala | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) 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 () {