summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-06-30 17:37:25 +0000
committersr55 <[email protected]>2012-06-30 17:37:25 +0000
commit02b77f3bc692e0d059c29ea907393fda31a3790b (patch)
tree2ace8eeb52e34d1f181d834e2392f859d6751cb0 /win/CS/HandBrakeWPF/ViewModels
parentca023df6b2119d7bf29ade5c07f644fdf2de8731 (diff)
WinGui: Assorted fixes.
- Implementation of CanBeBurned and CanBeForced on the subtitles panel. - Save updates to user presets from the Presets Options Menu. (Can use Add Preset to overwrite preset configuration instead also) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4800 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 0e508a7a2..7596919eb 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1227,6 +1227,33 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Update a selected preset.
+ /// </summary>
+ public void PresetUpdate()
+ {
+ if (this.SelectedPreset == null)
+ {
+ this.errorService.ShowMessageBox(
+ "Please select a preset to update.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+
+ return;
+ }
+
+ if (this.SelectedPreset.IsBuildIn)
+ {
+ this.errorService.ShowMessageBox(
+ "You can not modify built in presets. Please select one of your own presets.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ return;
+ }
+
+ this.SelectedPreset.Task = new EncodeTask(this.CurrentTask);
+ this.presetService.Update(this.SelectedPreset);
+
+ this.errorService.ShowMessageBox(
+ "The Preset has now been updated with your current settings.", "Preset Updated", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+
+ /// <summary>
/// Remove a Preset
/// </summary>
public void PresetRemove()
@@ -1475,6 +1502,8 @@ namespace HandBrakeWPF.ViewModels
{
MessageBox.Show("There is no new updates at this time.", "No Update Available", MessageBoxButton.OK, MessageBoxImage.Information);
}
+
+ this.ProgramStatusLabel = "Ready";
}
#endregion