cargo fmt
This commit is contained in:
parent
fdb064ffc8
commit
f9f0dad203
@ -138,7 +138,7 @@ pub mod xdg_dirs {
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use xdg;
|
use xdg;
|
||||||
|
|
||||||
lazy_static!{
|
lazy_static! {
|
||||||
pub(crate) static ref PODCASTS_XDG: xdg::BaseDirectories = {
|
pub(crate) static ref PODCASTS_XDG: xdg::BaseDirectories = {
|
||||||
xdg::BaseDirectories::with_prefix("gnome-podcasts").unwrap()
|
xdg::BaseDirectories::with_prefix("gnome-podcasts").unwrap()
|
||||||
};
|
};
|
||||||
|
|||||||
@ -507,22 +507,22 @@ impl PlayerWrapper {
|
|||||||
self.controls
|
self.controls
|
||||||
.pause
|
.pause
|
||||||
.connect_clicked(clone!(weak => move |_| {
|
.connect_clicked(clone!(weak => move |_| {
|
||||||
weak.upgrade().map(|p| p.pause());
|
weak.upgrade().map(|p| p.pause());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Connect the rewind button to the gst Player.
|
// Connect the rewind button to the gst Player.
|
||||||
self.controls
|
self.controls
|
||||||
.rewind
|
.rewind
|
||||||
.connect_clicked(clone!(weak => move |_| {
|
.connect_clicked(clone!(weak => move |_| {
|
||||||
weak.upgrade().map(|p| p.rewind());
|
weak.upgrade().map(|p| p.rewind());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Connect the fast-forward button to the gst Player.
|
// Connect the fast-forward button to the gst Player.
|
||||||
self.controls
|
self.controls
|
||||||
.forward
|
.forward
|
||||||
.connect_clicked(clone!(weak => move |_| {
|
.connect_clicked(clone!(weak => move |_| {
|
||||||
weak.upgrade().map(|p| p.fast_forward());
|
weak.upgrade().map(|p| p.fast_forward());
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
|||||||
@ -104,20 +104,20 @@ impl ShowMenu {
|
|||||||
fn connect_unsub(&self, pd: &Arc<Show>, sender: &Sender<Action>) {
|
fn connect_unsub(&self, pd: &Arc<Show>, sender: &Sender<Action>) {
|
||||||
self.unsub
|
self.unsub
|
||||||
.connect_clicked(clone!(pd, sender => move |unsub| {
|
.connect_clicked(clone!(pd, sender => move |unsub| {
|
||||||
// hack to get away without properly checking for none.
|
// hack to get away without properly checking for none.
|
||||||
// if pressed twice would panic.
|
// if pressed twice would panic.
|
||||||
unsub.set_sensitive(false);
|
unsub.set_sensitive(false);
|
||||||
|
|
||||||
sender.send(Action::RemoveShow(pd.clone()));
|
sender.send(Action::RemoveShow(pd.clone()));
|
||||||
|
|
||||||
sender.send(Action::HeaderBarNormal);
|
sender.send(Action::HeaderBarNormal);
|
||||||
sender.send(Action::ShowShowsAnimated);
|
sender.send(Action::ShowShowsAnimated);
|
||||||
// Queue a refresh after the switch to avoid blocking the db.
|
// Queue a refresh after the switch to avoid blocking the db.
|
||||||
sender.send(Action::RefreshShowsView);
|
sender.send(Action::RefreshShowsView);
|
||||||
sender.send(Action::RefreshEpisodesView);
|
sender.send(Action::RefreshEpisodesView);
|
||||||
|
|
||||||
unsub.set_sensitive(true);
|
unsub.set_sensitive(true);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user