diff options
author | sr55 <[email protected]> | 2012-11-24 11:24:43 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-11-24 11:24:43 +0000 |
commit | 1c82ce41279bb0a2bb1efef73814b1e1099379cb (patch) | |
tree | dbaf58cbd292e0e722a81fc74340cfd92c439e72 /win/CS | |
parent | c4250b87a11587ac17543af6890359be2f8fdebc (diff) |
WinGui: Couple of Audio and Advanced Panel bug fixes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5080 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
3 files changed, 28 insertions, 19 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 25d59529b..83e551b42 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -723,12 +723,8 @@ namespace HandBrake.ApplicationServices.Utilities if (!string.IsNullOrEmpty(fallbackEncoders))
{
- // Special Case, The CLI alredy defaults to ALL, so if all area selected, then just set copy-mask to none
- if (fallbackEncoders == "aac,ac3,dtshd,dts,mp3")
- {
- query += string.Format(" --audio-copy-mask none");
- }
- else
+ // Special Case, The CLI alredy defaults to ALL, so if all area selected, then don't need to set copy mask
+ if (fallbackEncoders != "aac,ac3,dtshd,dts,mp3")
{
query += string.Format(" --audio-copy-mask {0}", fallbackEncoders);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index 5cfa1f413..e66ea0920 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -14,11 +14,8 @@ namespace HandBrakeWPF.ViewModels using System.Globalization;
using System.Linq;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
using HandBrakeWPF.Helpers;
@@ -33,6 +30,11 @@ namespace HandBrakeWPF.ViewModels #region Constants and Fields
/// <summary>
+ /// AdvancedOptionsCache;
+ /// </summary>
+ private string optionsCache = string.Empty;
+
+ /// <summary>
/// Backing field for displaying x264 options
/// </summary>
private bool? displayX264Options;
@@ -164,13 +166,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="AdvancedViewModel"/> class.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
- /// <param name="userSettingService">
- /// The user Setting Service.
- /// </param>
- public AdvancedViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ public AdvancedViewModel()
{
this.Task = new EncodeTask();
this.UpdateUIFromAdvancedOptions();
@@ -913,11 +909,28 @@ namespace HandBrakeWPF.ViewModels /// </param>
public void SetEncoder(VideoEncoder encoder)
{
- this.DisplayX264Options = encoder == VideoEncoder.X264;
- if (encoder == VideoEncoder.Theora)
+ // If we are switching from x264, cache it's settings.
+ if (this.DisplayX264Options.HasValue && this.DisplayX264Options.Value )
{
+ this.optionsCache = this.AdvancedOptionsString;
+ }
+
+ // UI Set for new encoder.
+ if (encoder == VideoEncoder.X264)
+ {
+ this.AdvancedOptionsString = optionsCache;
+ this.DisplayX264Options = true;
+ }
+ else if (encoder == VideoEncoder.Theora)
+ {
+ this.AdvancedOptionsString = string.Empty;
this.DisplayX264Options = null;
}
+ else
+ {
+ this.AdvancedOptionsString = string.Empty;
+ this.DisplayX264Options = false;
+ }
}
#endregion
diff --git a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml index 674c86eca..f1a48b91f 100644 --- a/win/CS/HandBrakeWPF/Views/AdvancedView.xaml +++ b/win/CS/HandBrakeWPF/Views/AdvancedView.xaml @@ -224,7 +224,7 @@ <TextBlock Grid.Row="0"
Margin="10,5,0,0"
FontWeight="Bold"
- Text="Psychvisual: "
+ Text="Psychovisual: "
/>
<StackPanel Orientation="Horizontal">
<Label Width="110"
|