diff options
author | sr55 <[email protected]> | 2011-12-20 20:42:07 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-20 20:42:07 +0000 |
commit | 4d0e5554c2e8d0a9fced4c1e3e1662aa677ff748 (patch) | |
tree | 140caef970e82488612ad31507588f7c65167dcb /win/CS/Controls | |
parent | 7ebaeeb31c1eba5f86a79d9ae9946822e50232a9 (diff) |
WinGui: Some Audio Panel refactoring and an additional method to the scan service to allow scan logs to be more easily debugged.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4377 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Controls')
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 0f46ed1c1..61b908299 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -174,6 +174,7 @@ namespace Handbrake.Controls this.audioTracks.Add(track);
}
+ // It's a Preset, if the TrackNumber is 0, so allow the Automatic Track Selection to run after we've setup the presets audio settings.
if (tracks.Count == 0 || tracks[0].ScannedTrack.TrackNumber == 0)
{
this.AutomaticTrackSelection();
@@ -203,14 +204,14 @@ namespace Handbrake.Controls }
// Setup the Audio track source dropdown with the new audio tracks.
- // this.ScannedTracks.Clear();
this.drp_audioTrack.SelectedItem = null;
- this.ScannedTracks = new BindingList<Audio>(selectedTitle.AudioTracks.ToList());
- drp_audioTrack.DataSource = this.ScannedTracks;
+ foreach (Audio track in selectedTitle.AudioTracks)
+ {
+ this.ScannedTracks.Add(track);
+ }
drp_audioTrack.SelectedItem = this.ScannedTracks.FirstOrDefault();
- this.drp_audioTrack.Refresh();
-
+
// Add any tracks the preset has, if there is a preset and no audio tracks in the list currently
if (audioList.Rows.Count == 0 && preset != null)
{
@@ -255,7 +256,6 @@ namespace Handbrake.Controls AudioTrack track = audioList.SelectedRows[0].DataBoundItem as AudioTrack;
if (track == null)
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;
return;
}
@@ -283,14 +283,11 @@ namespace Handbrake.Controls // Configure the widgets with values
if (drp_audioEncoder.Text.Contains("Passthru"))
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;
track.Gain = 0;
track.DRC = 0;
}
- else
- {
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
- }
+
+ this.RefreshEnabledControls();
if (drp_audioEncoder.Text.Contains("Flac"))
{
|