kill a child

This commit is contained in:
Erica Z 2024-10-12 13:12:51 +00:00
parent 216be6798e
commit f8287e9ade
2 changed files with 5 additions and 5 deletions

View file

@ -15,6 +15,10 @@ template $WaveletPlayQueue: Adw.NavigationPage {
activate => $on_song_activate (); activate => $on_song_activate ();
model: Gtk.NoSelection {
model: bind template.songs;
};
factory: BuilderListItemFactory { factory: BuilderListItemFactory {
template ListItem { template ListItem {
child: Label { child: Label {

View file

@ -20,9 +20,7 @@
[GtkTemplate (ui = "/eu/callcc/Wavelet/play_queue.ui")] [GtkTemplate (ui = "/eu/callcc/Wavelet/play_queue.ui")]
public class Wavelet.PlayQueue : Adw.NavigationPage { public class Wavelet.PlayQueue : Adw.NavigationPage {
[GtkChild] private unowned Gtk.ListView list_view; public ListStore songs { get; private set; }
private ListStore songs;
// this is the index of the song that will play on next on_stream_start // this is the index of the song that will play on next on_stream_start
private uint next_stream_index; private uint next_stream_index;
@ -34,8 +32,6 @@ public class Wavelet.PlayQueue : Adw.NavigationPage {
construct { construct {
this.songs = new ListStore (typeof (Song)); this.songs = new ListStore (typeof (Song));
this.next_stream_index = 0; this.next_stream_index = 0;
this.list_view.model = new Gtk.NoSelection (this.songs);
} }
public void clear () { public void clear () {