summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-05-12 19:48:41 +0100
committersr55 <[email protected]>2016-05-12 19:48:41 +0100
commit16314ab0db954c46f64632e4111836061bd9748d (patch)
tree31e4e782eef340b81be7c5ad435ca79295f49aa3 /win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
parentc2ddfa317feb249bc4c39e986e9e60f9208bde0a (diff)
WinGui: Add a track list on the Audio Defaults screen. This changes the behaviour to match the Mac and Linux GUIs. So you no longer have to have a source audio track before you can create presets.
Diffstat (limited to 'win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs')
-rw-r--r--win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
index e88f1ade6..b0f81d0c4 100644
--- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
+++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
@@ -31,6 +31,7 @@ namespace HandBrakeWPF.Model.Audio
this.SelectedBehaviour = AudioBehaviourModes.None;
this.SelectedTrackDefaultBehaviour = AudioTrackDefaultsMode.None;
this.SelectedLangauges = new BindingList<string>();
+ this.BehaviourTracks = new BindingList<AudioBehaviourTrack>();
}
/// <summary>
@@ -44,6 +45,7 @@ namespace HandBrakeWPF.Model.Audio
this.SelectedBehaviour = behaviours.SelectedBehaviour;
this.SelectedTrackDefaultBehaviour = behaviours.SelectedTrackDefaultBehaviour;
this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
+ this.BehaviourTracks = behaviours.BehaviourTracks;
}
/// <summary>
@@ -108,6 +110,11 @@ namespace HandBrakeWPF.Model.Audio
}
/// <summary>
+ /// The list of track templates we are going to use to generate audio tracks for a source.
+ /// </summary>
+ public BindingList<AudioBehaviourTrack> BehaviourTracks { get; set; }
+
+ /// <summary>
/// Clone this object
/// </summary>
/// <returns>
@@ -116,11 +123,12 @@ namespace HandBrakeWPF.Model.Audio
public AudioBehaviours Clone()
{
AudioBehaviours cloned = new AudioBehaviours
- {
- SelectedBehaviour = this.selectedBehaviour,
- SelectedLangauges = new BindingList<string>(),
- SelectedTrackDefaultBehaviour = this.SelectedTrackDefaultBehaviour
- };
+ {
+ SelectedBehaviour = this.selectedBehaviour,
+ SelectedLangauges = new BindingList<string>(),
+ SelectedTrackDefaultBehaviour = this.SelectedTrackDefaultBehaviour,
+ BehaviourTracks = this.BehaviourTracks
+ };
foreach (var item in this.SelectedLangauges)
{