diff options
author | sr55 <[email protected]> | 2013-04-12 20:07:08 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-04-12 20:07:08 +0000 |
commit | da8a0f3ace2b71ef1cbb911d194dd1f9561017b0 (patch) | |
tree | c13e4d1e2826a881100bf36502fe3840760644a9 /win/CS/HandBrakeWPF/ViewModels | |
parent | ee69423b2777934d1fc19b41cd428c9e28f1b65f (diff) |
WinGui: Fix the x264 preset/tune/profile tooltip so that it now shows the equivalent x264 query. Also added an option to disable libhb features such as this incase this turns out to be problematic.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5397 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 29 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 32 |
3 files changed, 57 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index af4dce85b..8156aa806 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -142,6 +142,11 @@ namespace HandBrakeWPF.ViewModels private bool disableLibdvdNav;
/// <summary>
+ /// The disable libhb features
+ /// </summary>
+ private bool disableLibhbFeatures;
+
+ /// <summary>
/// The disable p reset update check notification.
/// </summary>
private bool disablePresetUpdateCheckNotification;
@@ -1342,6 +1347,24 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether DisableLibdvdNav.
+ /// </summary>
+ public bool DisableLibHbFeatures
+ {
+ get
+ {
+ return this.disableLibhbFeatures;
+ }
+
+ set
+ {
+ this.disableLibhbFeatures = value;
+ this.NotifyOfPropertyChange("DisableLibHbFeatures");
+ }
+ }
+
+
#endregion
#endregion
@@ -1636,6 +1659,9 @@ namespace HandBrakeWPF.ViewModels this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
this.EnableDebugFeatures = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableDebugFeatures);
this.EnableLibHb = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableLibHb);
+
+ // LibHbFeatures
+ this.DisableLibHbFeatures = userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibHbFeatures);
}
/// <summary>
@@ -1840,6 +1866,7 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
+ userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
int value;
if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))
@@ -1851,7 +1878,7 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);
userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString());
userSettingService.SetUserSetting(UserSettingConstants.EnableDebugFeatures, this.EnableDebugFeatures);
- userSettingService.SetUserSetting(UserSettingConstants.EnableLibHb, this.EnableLibHb);
+ userSettingService.SetUserSetting(UserSettingConstants.DisableLibHbFeatures, this.DisableLibHbFeatures);
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 4c01f8f35..963f7ef68 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -33,6 +33,7 @@ namespace HandBrakeWPF.ViewModels * - We are not handling cropping correctly within the UI.
* - The Height is not correctly set when using no Anamorphic
* - Maintain Aspect ratio needs corrected.
+ * - Custom Anamorphic.
*
*/
#region Constants and Fields
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index a59105084..514b45d5d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -28,6 +28,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Commands.Interfaces;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -497,6 +498,7 @@ namespace HandBrakeWPF.ViewModels {
this.Task.ExtraAdvancedArguments = value;
this.NotifyOfPropertyChange(() => this.ExtraArguments);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -514,6 +516,7 @@ namespace HandBrakeWPF.ViewModels {
this.displayX264Options = value;
this.NotifyOfPropertyChange(() => this.DisplayX264Options);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
@@ -533,6 +536,7 @@ namespace HandBrakeWPF.ViewModels this.x264PresetValue = value;
this.X264Preset = this.X264Presets[value];
this.NotifyOfPropertyChange(() => this.x264PresetValue);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -553,6 +557,7 @@ namespace HandBrakeWPF.ViewModels this.Task.X264Preset = value;
this.NotifyOfPropertyChange(() => this.X264Preset);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -574,6 +579,7 @@ namespace HandBrakeWPF.ViewModels this.Task.H264Profile = value;
this.NotifyOfPropertyChange(() => this.H264Profile);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -594,6 +600,7 @@ namespace HandBrakeWPF.ViewModels this.Task.H264Level = value;
this.NotifyOfPropertyChange(() => this.H264Level);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -614,6 +621,7 @@ namespace HandBrakeWPF.ViewModels this.Task.X264Tune = value;
this.NotifyOfPropertyChange(() => this.X264Tune);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -634,6 +642,7 @@ namespace HandBrakeWPF.ViewModels this.Task.FastDecode = value;
this.NotifyOfPropertyChange(() => this.FastDecode);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -665,7 +674,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return "You can provide additional arguments using the standard x264 format"; // string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query());
+ return string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query()); // "You can provide additional arguments using the standard x264 format";
}
}
@@ -897,13 +906,18 @@ namespace HandBrakeWPF.ViewModels /// </returns>
private string GetActualx264Query()
{
- string preset = EnumHelper<x264Preset>.GetDisplay(this.X264Preset);
- string profile = EnumHelper<x264Profile>.GetDisplay(this.H264Profile);
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibHbFeatures))
+ {
+ return string.Empty; // Feature is disabled.
+ }
+
+ string preset = EnumHelper<x264Preset>.GetDisplay(this.X264Preset).ToLower().Replace(" ", string.Empty);
+ string profile = EnumHelper<x264Profile>.GetDisplay(this.H264Profile).ToLower();
List<string> tunes = new List<string>();
if (X264Tune != x264Tune.None)
{
- tunes.Add(EnumHelper<x264Tune>.GetDisplay(this.X264Tune));
+ tunes.Add(this.X264Tune.ToString().ToLower().Replace(" ", string.Empty)); // TODO tidy this sillyness up.
}
if (this.FastDecode)
{
@@ -914,6 +928,16 @@ namespace HandBrakeWPF.ViewModels int width = this.Task.Width.HasValue ? this.Task.Width.Value : 720;
int height = this.Task.Height.HasValue ? this.Task.Height.Value : 576;
+ if (height == 0)
+ {
+ height = 576;
+ }
+
+ if (width == 0)
+ {
+ width = 720;
+ }
+
// TODO figure out what is wrong with this??
return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height);
}
|