summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-04-12 20:42:17 +0000
committersr55 <[email protected]>2012-04-12 20:42:17 +0000
commit62ee548526fb578b9027ef0d9deac02e509872f8 (patch)
treec14d4687c3a0346950726051249abd91d90e370c /win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
parent8dfb6d1874dbdac2754882b62e1e023af0c515a5 (diff)
WinGui: (WPF) Audio Panel Auto Passthru implementation.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4597 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index b8485be40..e2d71b354 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -87,6 +87,17 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public EncodeTask Task { get; set; }
+ /// <summary>
+ /// Gets a value indicating whether ShowPassthruOptions.
+ /// </summary>
+ public bool ShowPassthruOptions
+ {
+ get
+ {
+ return this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);
+ }
+ }
+
#endregion
#region Public Methods
@@ -129,11 +140,13 @@ namespace HandBrakeWPF.ViewModels
public void SetPreset(Preset preset, EncodeTask task)
{
this.Task = task;
- this.NotifyOfPropertyChange(() => this.Task);
+
if (preset != null && preset.Task != null)
{
this.AddTracksFromPreset(preset);
+ this.Task.AllowedPassthruOptions = new AllowedPassthru(preset.Task.AllowedPassthruOptions);
}
+ this.NotifyOfPropertyChange(() => this.Task);
this.Task.AllowedPassthruOptions.IsEnabled =
this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);