hm
This commit is contained in:
parent
e262d31261
commit
40612729a1
3 changed files with 4 additions and 5 deletions
|
@ -89,7 +89,7 @@ mod imp {
|
||||||
|
|
||||||
#[template_callback]
|
#[template_callback]
|
||||||
fn on_row_activated(&self, position: u32) {
|
fn on_row_activated(&self, position: u32) {
|
||||||
self.obj().window().play_index(position as i64);
|
self.obj().window().playlist_play_index(position as i64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ mod imp {
|
||||||
#[template(resource = "/eu/callcc/audrey/play_queue_song.ui")]
|
#[template(resource = "/eu/callcc/audrey/play_queue_song.ui")]
|
||||||
#[properties(wrapper_type = super::Song)]
|
#[properties(wrapper_type = super::Song)]
|
||||||
pub struct Song {
|
pub struct Song {
|
||||||
#[property(get, set = Self::set_playlist_pos)]
|
#[property(type = i64, set = Self::set_playlist_pos)]
|
||||||
playlist_pos: Cell<i64>,
|
_playlist_pos: (),
|
||||||
|
|
||||||
#[property(set, get)]
|
#[property(set, get)]
|
||||||
draggable: Cell<bool>,
|
draggable: Cell<bool>,
|
||||||
|
@ -167,7 +167,6 @@ mod imp {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_playlist_pos(&self, playlist_pos: i64) {
|
fn set_playlist_pos(&self, playlist_pos: i64) {
|
||||||
self.playlist_pos.set(playlist_pos);
|
|
||||||
self.obj()
|
self.obj()
|
||||||
.set_current(playlist_pos == self.position.get() as i64);
|
.set_current(playlist_pos == self.position.get() as i64);
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,7 @@ impl Window {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn play_index(&self, index: i64) {
|
pub fn playlist_play_index(&self, index: i64) {
|
||||||
self.imp()
|
self.imp()
|
||||||
.mpv
|
.mpv
|
||||||
.command(["playlist-play-index", &index.to_string()])
|
.command(["playlist-play-index", &index.to_string()])
|
||||||
|
|
Loading…
Reference in a new issue