Compare commits

..

No commits in common. "932471218aab67f188f1c774d7858a4c137f36cc" and "ad675baa7466c14a4a8781e02e9afde13f5efd29" have entirely different histories.

2 changed files with 12 additions and 29 deletions

View file

@ -21,7 +21,7 @@ template $AudreyUiPlaybar: Adw.Bin {
] ]
[start] [start]
Box start { Box {
AspectFrame { AspectFrame {
visible: false; // FIXME annoying annoying annoying annoying visible: false; // FIXME annoying annoying annoying annoying
// visible: bind template.show_cover_art; // visible: bind template.show_cover_art;
@ -156,7 +156,7 @@ template $AudreyUiPlaybar: Adw.Bin {
} }
[end] [end]
Box end { Box {
Button { Button {
icon-name: "heart-empty-symbolic"; // placeholder icon-name: "heart-empty-symbolic"; // placeholder
valign: center; valign: center;
@ -184,9 +184,3 @@ template $AudreyUiPlaybar: Adw.Bin {
}; };
}; };
} }
// make sure the middle is centered always
SizeGroup {
mode: horizontal;
widgets [start, end]
}

View file

@ -242,46 +242,35 @@ impl Player {
#[zbus::interface(name = "org.mpris.MediaPlayer2.Player")] #[zbus::interface(name = "org.mpris.MediaPlayer2.Player")]
impl Player { impl Player {
fn next(&self) -> zbus::fdo::Result<()> { fn next(&self) -> zbus::fdo::Result<()> {
self.window().playlist_next(); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn previous(&self) -> zbus::fdo::Result<()> { fn previous(&self) -> zbus::fdo::Result<()> {
self.window().playlist_prev(); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn pause(&self) -> zbus::fdo::Result<()> { fn pause(&self) -> zbus::fdo::Result<()> {
self.window().set_pause(true); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn play_pause(&self) -> zbus::fdo::Result<()> { fn play_pause(&self) -> zbus::fdo::Result<()> {
self.window().set_pause(!self.window().pause()); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn stop(&self) -> zbus::fdo::Result<()> { fn stop(&self) -> zbus::fdo::Result<()> {
self.window().set_pause(true); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
self.window().set_time_pos(0.0);
Ok(())
} }
fn play(&self) -> zbus::fdo::Result<()> { fn play(&self) -> zbus::fdo::Result<()> {
self.window().set_pause(false); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn seek(&self, offset: i64) -> zbus::fdo::Result<()> { fn seek(&self, _offset: i64) -> zbus::fdo::Result<()> {
self.window().seek(offset as f64 / MICROSECONDS); Err(zbus::fdo::Error::NotSupported("not implemented".into()))
Ok(())
} }
fn set_position(&self, track_id: ObjectPath<'_>, position: i64) -> zbus::fdo::Result<()> { 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()) { Err(zbus::fdo::Error::NotSupported("not implemented".into()))
self.window().set_time_pos(position as f64 / MICROSECONDS);
}
Ok(())
} }
fn open_uri(&self, _s: String) -> zbus::fdo::Result<()> { fn open_uri(&self, _s: String) -> zbus::fdo::Result<()> {