summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-05-22 20:20:49 +0100
committersr55 <[email protected]>2019-05-22 20:20:49 +0100
commitc976c8399a041d4a75f713ea6dfc4be7c20a222a (patch)
tree5691e74cde6a4678f498d19330bbbef9e6a69186 /win/CS/HandBrakeWPF/Services
parentaed187e1b8e8d29d23dea695f80924a6d28bce2d (diff)
WinGui: Add Preference to perform the When Done Action immediately without the 60 second prompt. (off by default)
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/PrePostActionService.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
index 20a6c39a8..44d20dfa4 100644
--- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
+++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
@@ -141,15 +141,20 @@ namespace HandBrakeWPF.Services
}
// Give the user the ability to cancel the shutdown. Default 60 second timer.
- ICountdownAlertViewModel titleSpecificView = IoC.Get<ICountdownAlertViewModel>();
- Execute.OnUIThread(
- () =>
+ bool isCancelled = false;
+ if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.WhenDonePerformActionImmediately))
+ {
+ ICountdownAlertViewModel titleSpecificView = IoC.Get<ICountdownAlertViewModel>();
+ Execute.OnUIThread(
+ () =>
{
titleSpecificView.SetAction(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction));
this.windowManager.ShowDialog(titleSpecificView);
+ isCancelled = titleSpecificView.IsCancelled;
});
+ }
- if (!titleSpecificView.IsCancelled)
+ if (!isCancelled)
{
// Do something when the encode ends.
switch (this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction))