mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Fix some small lifetime issues
This commit is contained in:
parent
0898bf63c9
commit
ee42002d2e
2 changed files with 8 additions and 4 deletions
|
|
@ -193,7 +193,7 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
// }));
|
// }));
|
||||||
|
|
||||||
this.list.set_make_widget_cb(clone!(@weak this => move |index| {
|
this.list.set_make_widget_cb(clone!(@weak this => move |index| {
|
||||||
match this.items.borrow()[index] {
|
let widget = match this.items.borrow()[index] {
|
||||||
ListItem::Header(item_index) => {
|
ListItem::Header(item_index) => {
|
||||||
let playlist_item = &this.playlist.borrow()[item_index];
|
let playlist_item = &this.playlist.borrow()[item_index];
|
||||||
let recording = &playlist_item.track_set.recording;
|
let recording = &playlist_item.track_set.recording;
|
||||||
|
|
@ -246,7 +246,9 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
let separator = gtk::Separator::new(gtk::Orientation::Horizontal);
|
let separator = gtk::Separator::new(gtk::Orientation::Horizontal);
|
||||||
separator.upcast()
|
separator.upcast()
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
widget
|
||||||
}));
|
}));
|
||||||
|
|
||||||
player.send_data();
|
player.send_data();
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ impl Screen<Recording, ()> for RecordingScreen {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.list.set_make_widget_cb(clone!(@weak this => move |index| {
|
this.list.set_make_widget_cb(clone!(@weak this => move |index| {
|
||||||
match this.items.borrow()[index] {
|
let widget = match this.items.borrow()[index] {
|
||||||
ListItem::Track(track_set_index, track_index) => {
|
ListItem::Track(track_set_index, track_index) => {
|
||||||
let track_set = &this.track_sets.borrow()[track_set_index];
|
let track_set = &this.track_sets.borrow()[track_set_index];
|
||||||
let track = &track_set.tracks[track_index];
|
let track = &track_set.tracks[track_index];
|
||||||
|
|
@ -111,7 +111,9 @@ impl Screen<Recording, ()> for RecordingScreen {
|
||||||
let separator = gtk::Separator::new(gtk::Orientation::Horizontal);
|
let separator = gtk::Separator::new(gtk::Orientation::Horizontal);
|
||||||
separator.upcast()
|
separator.upcast()
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
widget
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Load the content asynchronously.
|
// Load the content asynchronously.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue