diff options
author | Scott <[email protected]> | 2015-12-14 19:59:27 +0000 |
---|---|---|
committer | Scott <[email protected]> | 2015-12-14 20:12:29 +0000 |
commit | cd2eb1c2b13d15dd58842d8eabea978075979554 (patch) | |
tree | b65472c608e76c154a54e6c2599fd064a8e72ef3 /win/CS/HandBrakeWPF | |
parent | 808c4c5e353e08e32d54c48dce96598996b1c91c (diff) |
WinGui: Ability to Force Preset updates change tidy up
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 8 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 752fd547e..c0b0c61d8 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1250,6 +1250,16 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to HandBrake is unable to upgrade your presets file to a new version format.
+ ///Your preset file will be archived and new one created. You will need to re-create your own presets..
+ /// </summary>
+ public static string Presets_PresetForceReset {
+ get {
+ return ResourceManager.GetString("Presets_PresetForceReset", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to The Built-in presets have been reset..
/// </summary>
public static string Presets_ResetComplete {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 765b9636b..a63772ad6 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -789,4 +789,8 @@ Are you sure you want to import the chapter names?</value> <data name="ScanService_ScanStopFailed" xml:space="preserve">
<value>An error occured when trying to stop the scan. Please restart HandBrake.</value>
</data>
+ <data name="Presets_PresetForceReset" xml:space="preserve">
+ <value>HandBrake is unable to upgrade your presets file to a new version format.
+Your preset file will be archived and new one created. You will need to re-create your own presets.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index de1aefbf8..6e6935f00 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -43,7 +43,7 @@ namespace HandBrakeWPF.Services.Presets {
#region Private Variables
- public const int ForcePresetReset = 0;
+ public const int ForcePresetReset = 2;
public static string UserPresetCatgoryName = "User Presets";
private readonly string presetFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.json";
private readonly ObservableCollection<Preset> presets = new ObservableCollection<Preset>();
@@ -544,11 +544,13 @@ namespace HandBrakeWPF.Services.Presets }
// Force Upgrade of presets
- if (this.userSettingService.GetUserSetting<int>(UserSettingConstants.ForcePresetReset) > ForcePresetReset)
+ if (this.userSettingService.GetUserSetting<int>(UserSettingConstants.ForcePresetReset) < ForcePresetReset)
{
+ this.userSettingService.SetUserSetting(UserSettingConstants.ForcePresetReset, ForcePresetReset);
+
string fileName = this.ArchivePresetFile(this.presetFile);
this.errorService.ShowMessageBox(
- Resources.PresetService_PresetsOutOfDate
+ Resources.Presets_PresetForceReset
+ Environment.NewLine + Environment.NewLine + Resources.PresetService_ArchiveFile + fileName,
Resources.PresetService_UnableToLoad,
MessageBoxButton.OK,
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 762734009..fc7856d72 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -477,7 +477,7 @@ <string>ForcePresetReset</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">0</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">2</anyType>
</value>
</item>
</dictionary>
\ No newline at end of file |