Compare commits
No commits in common. "932471218aab67f188f1c774d7858a4c137f36cc" and "ad675baa7466c14a4a8781e02e9afde13f5efd29" have entirely different histories.
932471218a
...
ad675baa74
2 changed files with 12 additions and 29 deletions
|
@ -21,7 +21,7 @@ template $AudreyUiPlaybar: Adw.Bin {
|
|||
]
|
||||
|
||||
[start]
|
||||
Box start {
|
||||
Box {
|
||||
AspectFrame {
|
||||
visible: false; // FIXME annoying annoying annoying annoying
|
||||
// visible: bind template.show_cover_art;
|
||||
|
@ -156,7 +156,7 @@ template $AudreyUiPlaybar: Adw.Bin {
|
|||
}
|
||||
|
||||
[end]
|
||||
Box end {
|
||||
Box {
|
||||
Button {
|
||||
icon-name: "heart-empty-symbolic"; // placeholder
|
||||
valign: center;
|
||||
|
@ -184,9 +184,3 @@ template $AudreyUiPlaybar: Adw.Bin {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
// make sure the middle is centered always
|
||||
SizeGroup {
|
||||
mode: horizontal;
|
||||
widgets [start, end]
|
||||
}
|
||||
|
|
|
@ -242,46 +242,35 @@ impl Player {
|
|||
#[zbus::interface(name = "org.mpris.MediaPlayer2.Player")]
|
||||
impl Player {
|
||||
fn next(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().playlist_next();
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn previous(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().playlist_prev();
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn pause(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().set_pause(true);
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn play_pause(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().set_pause(!self.window().pause());
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn stop(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().set_pause(true);
|
||||
self.window().set_time_pos(0.0);
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn play(&self) -> zbus::fdo::Result<()> {
|
||||
self.window().set_pause(false);
|
||||
Ok(())
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn seek(&self, offset: i64) -> zbus::fdo::Result<()> {
|
||||
self.window().seek(offset as f64 / MICROSECONDS);
|
||||
Ok(())
|
||||
fn seek(&self, _offset: i64) -> zbus::fdo::Result<()> {
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn set_position(&self, track_id: ObjectPath<'_>, position: i64) -> zbus::fdo::Result<()> {
|
||||
if Some(track_id) == self.metadata.track_id.as_ref().map(|x| x.as_ref()) {
|
||||
self.window().set_time_pos(position as f64 / MICROSECONDS);
|
||||
}
|
||||
Ok(())
|
||||
fn set_position(&self, _track_id: ObjectPath<'_>, _position: i64) -> zbus::fdo::Result<()> {
|
||||
Err(zbus::fdo::Error::NotSupported("not implemented".into()))
|
||||
}
|
||||
|
||||
fn open_uri(&self, _s: String) -> zbus::fdo::Result<()> {
|
||||
|
|
Loading…
Reference in a new issue