ShowWidget: Change the mark_all notif wording.

This commit is contained in:
Jordan Petridis 2018-03-09 16:43:13 +02:00
parent 483fd090f1
commit 3423d854e1
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 3 additions and 5 deletions

View File

@ -279,7 +279,7 @@ Tobias Bernard
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="text" translatable="yes">Mark all epiodes as Watched</property> <property name="text" translatable="yes">Mark all episodes as listened</property>
<property name="centered">True</property> <property name="centered">True</property>
</object> </object>
<packing> <packing>

View File

@ -162,17 +162,15 @@ impl App {
Ok(Action::HeaderBarShowUpdateIndicator) => headerbar.show_update_notification(), Ok(Action::HeaderBarShowUpdateIndicator) => headerbar.show_update_notification(),
Ok(Action::HeaderBarHideUpdateIndicator) => headerbar.hide_update_notification(), Ok(Action::HeaderBarHideUpdateIndicator) => headerbar.hide_update_notification(),
Ok(Action::MarkAllPlayerNotification(pd)) => { Ok(Action::MarkAllPlayerNotification(pd)) => {
let sender = sender.clone();
let callback = clone!(sender => move || { let callback = clone!(sender => move || {
if let Err(err) = mark_all_watched(&pd, sender.clone()) { if let Err(err) = mark_all_watched(&pd, sender.clone()) {
error!("Something went horribly wrong with the notif callback: {}", err); error!("Something went horribly wrong with the notif callback: {}", err);
} }
glib::Continue(false) glib::Continue(false)
}); });
let text = "All episodes where marked as watched.";
let sender = sender.clone(); let text = "Marked all episodes as listened.";
let notif = InAppNotification::new(text.into(), callback, sender); let notif = InAppNotification::new(text.into(), callback, sender.clone());
overlay.add_overlay(&notif.overlay); overlay.add_overlay(&notif.overlay);
// We need to display the notification after the widget is added to the overlay // We need to display the notification after the widget is added to the overlay
// so there will be a nice animation. // so there will be a nice animation.