summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-10-10 20:22:46 +0000
committersr55 <[email protected]>2012-10-10 20:22:46 +0000
commit60f0a6693164d25b21676711835abe8f0e0d40c3 (patch)
tree2b5117f94ac9144fe73d28009667dd6a0ba9d692
parent3bf7a95521abb4d943c978c68f57b30ee197ff43 (diff)
WinGui: Settings tidyup
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5013 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs20
-rw-r--r--win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs10
-rw-r--r--win/CS/HandBrakeWPF/Services/UpdateService.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/UpdateVersionService.cs10
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs20
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs6
7 files changed, 36 insertions, 36 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
index 102e221b7..2a4aa18c0 100644
--- a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
@@ -20,11 +20,6 @@ namespace HandBrake.ApplicationServices
public const string Verbosity = "Verbosity";
/// <summary>
- /// The X264 Stepper
- /// </summary>
- public const string X264Step = "X264Step";
-
- /// <summary>
/// When Complete Action
/// </summary>
public const string WhenCompleteAction = "WhenCompleteAction";
@@ -65,21 +60,6 @@ namespace HandBrake.ApplicationServices
public const string HandBrakeBuild = "HandBrakeBuild";
/// <summary>
- /// HandBrakes build
- /// </summary>
- public const string HandBrakePlatform = "HandBrakePlatform";
-
- /// <summary>
- /// HandBrakes CLI Exe SHA1 Hash
- /// </summary>
- public const string HandBrakeExeHash = "HandBrakeExeHash";
-
- /// <summary>
- /// The Instance Id
- /// </summary>
- public const string InstanceId = "InstanceId";
-
- /// <summary>
/// Disable Libdvdnav
/// </summary>
public const string DisableLibDvdNav = "DisableLibDvdNav";
diff --git a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
index da349c417..ee0df3b88 100644
--- a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
@@ -51,7 +51,7 @@ namespace HandBrakeWPF.Helpers
string base64Hash = Convert.ToBase64String(hash);
// Compare the hash with the last known hash. If it's the same, return.
- if (userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeExeHash) == base64Hash)
+ if (userSettingService.GetUserSetting<string>(UserSettingConstants.HandBrakeExeHash) == base64Hash)
{
return;
}
@@ -94,7 +94,7 @@ namespace HandBrakeWPF.Helpers
if (platform.Success)
{
userSettingService.SetUserSetting(
- ASUserSettingConstants.HandBrakePlatform, platform.Value.Replace("-", string.Empty).Trim());
+ UserSettingConstants.HandBrakePlatform, platform.Value.Replace("-", string.Empty).Trim());
}
}
@@ -112,15 +112,15 @@ namespace HandBrakeWPF.Helpers
if (success)
{
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeExeHash, base64Hash);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeExeHash, base64Hash);
}
}
catch (Exception e)
{
userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, 0);
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakePlatform, string.Empty);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakePlatform, string.Empty);
userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeVersion, string.Empty);
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeExeHash, string.Empty);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeExeHash, string.Empty);
errorService.ShowError(
"Unable to Initialise HandBrake. This error is unrecoverable.", " Try restarting.", e);
diff --git a/win/CS/HandBrakeWPF/Services/UpdateService.cs b/win/CS/HandBrakeWPF/Services/UpdateService.cs
index 2b6cfa852..112493ac7 100644
--- a/win/CS/HandBrakeWPF/Services/UpdateService.cs
+++ b/win/CS/HandBrakeWPF/Services/UpdateService.cs
@@ -87,7 +87,7 @@ namespace HandBrakeWPF.Services
try
{
string url =
- this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakePlatform)
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.HandBrakePlatform)
.Contains("x86_64")
? this.userSettingService.GetUserSetting<string>(UserSettingConstants.Appcast_x64)
: this.userSettingService.GetUserSetting<string>(UserSettingConstants.Appcast_i686);
diff --git a/win/CS/HandBrakeWPF/Services/UpdateVersionService.cs b/win/CS/HandBrakeWPF/Services/UpdateVersionService.cs
index 0472f9da2..e0de1d88a 100644
--- a/win/CS/HandBrakeWPF/Services/UpdateVersionService.cs
+++ b/win/CS/HandBrakeWPF/Services/UpdateVersionService.cs
@@ -72,7 +72,7 @@ namespace HandBrakeWPF.Services
string base64Hash = Convert.ToBase64String(hash);
// Compare the hash with the last known hash. If it's the same, return.
- if (userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeExeHash) == base64Hash)
+ if (userSettingService.GetUserSetting<string>(UserSettingConstants.HandBrakeExeHash) == base64Hash)
{
return;
}
@@ -115,7 +115,7 @@ namespace HandBrakeWPF.Services
if (platform.Success)
{
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakePlatform, platform.Value.Replace("-", string.Empty).Trim());
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakePlatform, platform.Value.Replace("-", string.Empty).Trim());
}
if (cliProcess.TotalProcessorTime.Seconds > 10) // Don't wait longer than 10 seconds.
@@ -128,14 +128,14 @@ namespace HandBrakeWPF.Services
}
}
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeExeHash, base64Hash);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeExeHash, base64Hash);
}
catch (Exception e)
{
userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, string.Empty);
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakePlatform, string.Empty);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakePlatform, string.Empty);
userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeVersion, string.Empty);
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeExeHash, string.Empty);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeExeHash, string.Empty);
this.errorService.ShowError("Unable to Initialise HandBrake", "This error is unrecoverable. Maybe try restarting.", e);
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index 9371dc733..fb35f0cdb 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -191,6 +191,26 @@ namespace HandBrakeWPF
/// </summary>
public const string GrowlQueue = "GrowlQueue";
+ /// <summary>
+ /// HandBrakes CLI Exe SHA1 Hash
+ /// </summary>
+ public const string HandBrakeExeHash = "HandBrakeExeHash";
+
+ /// <summary>
+ /// The Instance Id
+ /// </summary>
+ public const string InstanceId = "InstanceId";
+
+ /// <summary>
+ /// The X264 Stepper
+ /// </summary>
+ public const string X264Step = "X264Step";
+
+ /// <summary>
+ /// HandBrakes build
+ /// </summary>
+ public const string HandBrakePlatform = "HandBrakePlatform";
+
#endregion
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 779e3e86a..6404188c0 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1654,7 +1654,7 @@ namespace HandBrakeWPF.ViewModels
this.ConstantQualityGranularity.Add("0.50");
this.ConstantQualityGranularity.Add("0.25");
this.ConstantQualityGranularity.Add("0.20");
- this.SelectedGranulairty = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step).ToString("0.00", CultureInfo.InvariantCulture);
+ this.SelectedGranulairty = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step).ToString("0.00", CultureInfo.InvariantCulture);
// Min Title Length
this.MinLength = this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.MinScanDuration);
@@ -1872,7 +1872,7 @@ namespace HandBrakeWPF.ViewModels
userSettingService.SetUserSetting(UserSettingConstants.PresetNotification, this.DisablePresetUpdateCheckNotification);
userSettingService.SetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);
userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);
- userSettingService.SetUserSetting(ASUserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
+ userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
int value;
if (int.TryParse(this.MinLength.ToString(), out value))
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index b14e09ff4..9dabbd323 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -253,7 +253,7 @@ namespace HandBrakeWPF.ViewModels
{
this.rf = value;
- double cqStep = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step);
+ double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
this.SetQualitySliderBounds();
switch (this.SelectedVideoEncoder)
{
@@ -435,7 +435,7 @@ namespace HandBrakeWPF.ViewModels
break;
}
- double cqStep = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step);
+ double cqStep = userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step);
double rfValue = 0;
this.SetQualitySliderBounds();
switch (this.SelectedVideoEncoder)
@@ -550,7 +550,7 @@ namespace HandBrakeWPF.ViewModels
break;
case VideoEncoder.X264:
this.QualityMin = 0;
- this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step));
+ this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(UserSettingConstants.X264Step));
break;
case VideoEncoder.Theora:
this.QualityMin = 0;