diff options
author | sr55 <[email protected]> | 2016-12-13 19:35:02 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-12-13 19:35:10 +0000 |
commit | 35130882b828ff6af96fafa2a24a8b9afc898f0d (patch) | |
tree | 2a96438e8fe0c3ba915b447847829bef1f862ac7 /win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs | |
parent | 1f418c2cf9e74f907311b0f5e77d84342e570e35 (diff) |
WinGui: Advanced Tab Changes
1. Strip out a lot of the old advanced tab infrastructure as it is no longer needed. Only the deprecated X264 Advacned Panel is left. All other encoders use the Video tab now.
2. Changed Option to "Allow use of 'Advanced Tab'" and only show the tab if the checkbox on the video tab is checked. It will no longer show based on the perference alone.
3. Fix the one-way communication from Video Tab to X264 Tab so preset options are reflected ont he X264 Tab. The reverse is not supported but it will retain the previous options.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs index 5b2694cd9..ac92b760f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/X264ViewModel.cs @@ -16,7 +16,6 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Interop.Model.Encoding;
- using HandBrakeWPF.Commands.Interfaces;
using HandBrakeWPF.Helpers;
using HandBrakeWPF.Model;
using HandBrakeWPF.Services.Presets.Model;
@@ -30,11 +29,6 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class X264ViewModel : ViewModelBase, IX264ViewModel
{
- /// <summary>
- /// The advanced encoder options command.
- /// </summary>
- private readonly IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand;
-
#region Constants and Fields
/// <summary>
@@ -164,12 +158,8 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="X264ViewModel"/> class.
/// </summary>
- /// <param name="advancedEncoderOptionsCommand">
- /// The advanced Encoder Options Command.
- /// </param>
- public X264ViewModel(IAdvancedEncoderOptionsCommand advancedEncoderOptionsCommand)
+ public X264ViewModel()
{
- this.advancedEncoderOptionsCommand = advancedEncoderOptionsCommand;
this.Task = new EncodeTask();
this.UpdateUIFromAdvancedOptions();
}
@@ -190,6 +180,11 @@ namespace HandBrakeWPF.ViewModels ShowX264AdvancedOptions = this.Task.ShowAdvancedTab;
this.NotifyOfPropertyChange(() => ShowX264AdvancedOptions);
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
+
+ if (ShowX264AdvancedOptions)
+ {
+ this.UpdateUIFromAdvancedOptions();
+ }
}
}
@@ -253,12 +248,6 @@ namespace HandBrakeWPF.ViewModels this.Task.AdvancedEncoderOptions = value;
this.UpdateUIFromAdvancedOptions();
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
-
- // Reset the video tab if the user is using this tab.
- if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions))
- {
- this.advancedEncoderOptionsCommand.ExecuteClearVideo();
- }
}
}
@@ -1154,12 +1143,6 @@ namespace HandBrakeWPF.ViewModels this.Task.AdvancedEncoderOptions = string.Join(":", newOptions);
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
-
- // Reset the video tab if the user is using this tab.
- if (!string.IsNullOrEmpty(this.Task.AdvancedEncoderOptions))
- {
- this.advancedEncoderOptionsCommand.ExecuteClearVideo();
- }
}
#endregion
|