diff options
author | sr55 <[email protected]> | 2015-04-18 19:03:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-18 19:03:56 +0000 |
commit | 8dbb216c9e01ca7102b24e8e5ebd09304a7ee0a9 (patch) | |
tree | 233e3bfa996cd0115d831f3353d0bc24a929b114 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | |
parent | 906ec1611817b6a0eb26f694f34aaacd13aabdbc (diff) |
WinGui: Adding Del shortcut to preset pane, and better warnings when deleting.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7103 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 7465ceb10..652068444 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1638,6 +1638,29 @@ namespace HandBrakeWPF.ViewModels {
if (this.selectedPreset != null)
{
+ if (this.selectedPreset.IsDefault)
+ {
+ this.errorService.ShowMessageBox(
+ "You can not delete the default preset. Please set another preset as default first.",
+ Resources.Warning,
+ MessageBoxButton.OK,
+ MessageBoxImage.Information);
+
+ return;
+ }
+
+ MessageBoxResult result =
+ this.errorService.ShowMessageBox(
+ "Are you sure you want to delete the preset: " + this.selectedPreset.Name + " ?",
+ Resources.Question,
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result == MessageBoxResult.No)
+ {
+ return;
+ }
+
this.presetService.Remove(this.selectedPreset);
}
else
|