diff options
author | sr55 <[email protected]> | 2017-06-07 20:37:21 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2017-06-07 20:37:21 +0100 |
commit | b97eca8ba68e4e5aaf6f13b8f1eefa62a3fd86bd (patch) | |
tree | 35887d455599604666efed4ae07c3f2047d5a372 /win/CS/HandBrakeWPF | |
parent | e2632a1177355ad0d502c06c288bdad4e01c0b35 (diff) |
WinGui: Prevent the export of built-in presets. There is little point in allowing this. The UI does not allow importing them. #768
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 23 |
3 files changed, 14 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index a2b1d136a..1700e98bf 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1001,7 +1001,7 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to Please select a preset..
+ /// Looks up a localized string similar to Please select make sure you have selected one of your own presets. Please note that you cannot export built-in presets..
/// </summary>
public static string Main_SelectPreset {
get {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 2e318f3cd..ad0ffd029 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -419,7 +419,7 @@ The previous user_presets.xml file was backed up.</value> <value>You must first scan a source and setup your job before starting an encode. Click the 'Source' button on the toolbar to continue.</value>
</data>
<data name="Main_SelectPreset" xml:space="preserve">
- <value>Please select a preset.</value>
+ <value>Please select make sure you have selected one of your own presets. Please note that you cannot export built-in presets.</value>
</data>
<data name="Main_SelectPresetForUpdate" xml:space="preserve">
<value>Please select a preset to update.</value>
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 31efc4d9b..0a8d0b297 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2031,17 +2031,18 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void PresetExport()
{
- SaveFileDialog savefiledialog = new SaveFileDialog
- {
- Filter = "json|*.json",
- CheckPathExists = true,
- AddExtension = true,
- DefaultExt = ".json",
- OverwritePrompt = true,
- FilterIndex = 0
- };
- if (this.selectedPreset != null)
- {
+ if (this.selectedPreset != null && !this.selectedPreset.IsBuildIn)
+ {
+ SaveFileDialog savefiledialog = new SaveFileDialog
+ {
+ Filter = "json|*.json",
+ CheckPathExists = true,
+ AddExtension = true,
+ DefaultExt = ".json",
+ OverwritePrompt = true,
+ FilterIndex = 0
+ };
+
savefiledialog.ShowDialog();
string filename = savefiledialog.FileName;
|