summaryrefslogtreecommitdiffstats
path: root/win/CS/Controls
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-09-16 18:32:02 +0000
committersr55 <[email protected]>2011-09-16 18:32:02 +0000
commit454b357568586289bea24d6c0043fe415bb28512 (patch)
tree6efd4dc945cf60189dea25385d8a3a584a9b3c0c /win/CS/Controls
parent1a521e3ac23d7036823ae3b157e9a7c7719b2cdd (diff)
WinGui: Fixes to the Audio Panel.
- Fix a display issue with Encoder and Mixdown on the data grid. - Don't try to load tracks if there isn't any. - Fix an issue with auto-correction of Passthru option. (DTS-HD would not auto-correct to the correct passthru for the source track type) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4225 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Controls')
-rw-r--r--win/CS/Controls/AudioPanel.Designer.cs166
-rw-r--r--win/CS/Controls/AudioPanel.cs11
-rw-r--r--win/CS/Controls/AudioPanel.resx3
3 files changed, 90 insertions, 90 deletions
diff --git a/win/CS/Controls/AudioPanel.Designer.cs b/win/CS/Controls/AudioPanel.Designer.cs
index 6b2a0ad5f..4bc063b18 100644
--- a/win/CS/Controls/AudioPanel.Designer.cs
+++ b/win/CS/Controls/AudioPanel.Designer.cs
@@ -50,13 +50,6 @@ namespace Handbrake.Controls
this.drp_audioSample = new System.Windows.Forms.ComboBox();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.audioList = new System.Windows.Forms.DataGridView();
- this.Source = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.AudioCodec = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Mixdown = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Samplerate = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Bitrate = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Gain = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ToolTips = new System.Windows.Forms.ToolTip(this.components);
this.btn_AdvancedAudio = new System.Windows.Forms.Button();
this.btn_addAudioTrack = new wyDay.Controls.SplitButton();
@@ -65,6 +58,13 @@ namespace Handbrake.Controls
this.btn_RemoveTrack = new wyDay.Controls.SplitButton();
this.RemoveTrackMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_ClearAll = new System.Windows.Forms.ToolStripMenuItem();
+ this.Source = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.AudioCodec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Mixdown = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Samplerate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Bitrate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Gain = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.audioMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
this.AddTrackMenu.SuspendLayout();
@@ -264,74 +264,6 @@ namespace Handbrake.Controls
this.ToolTips.SetToolTip(this.audioList, "The audio tracks to be encoded into the output file.");
this.audioList.SelectionChanged += new System.EventHandler(this.audioList_SelectionChanged);
//
- // Source
- //
- this.Source.DataPropertyName = "TrackDisplay";
- this.Source.FillWeight = 49.69727F;
- this.Source.HeaderText = "Source";
- this.Source.Name = "Source";
- this.Source.ReadOnly = true;
- this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Source.Width = 170;
- //
- // AudioCodec
- //
- this.AudioCodec.DataPropertyName = "Encoder";
- this.AudioCodec.HeaderText = "Audio Codec";
- this.AudioCodec.Name = "AudioCodec";
- this.AudioCodec.ReadOnly = true;
- this.AudioCodec.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.AudioCodec.Width = 120;
- //
- // Mixdown
- //
- this.Mixdown.DataPropertyName = "Mixdown";
- this.Mixdown.FillWeight = 49.69727F;
- this.Mixdown.HeaderText = "Mixdown";
- this.Mixdown.Name = "Mixdown";
- this.Mixdown.ReadOnly = true;
- this.Mixdown.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Mixdown.Width = 150;
- //
- // Samplerate
- //
- this.Samplerate.DataPropertyName = "SampleRateDisplayValue";
- this.Samplerate.FillWeight = 49.69727F;
- this.Samplerate.HeaderText = "Samplerate";
- this.Samplerate.Name = "Samplerate";
- this.Samplerate.ReadOnly = true;
- this.Samplerate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Samplerate.Width = 75;
- //
- // Bitrate
- //
- this.Bitrate.DataPropertyName = "BitRateDisplayValue";
- this.Bitrate.FillWeight = 49.69727F;
- this.Bitrate.HeaderText = "Bitrate";
- this.Bitrate.Name = "Bitrate";
- this.Bitrate.ReadOnly = true;
- this.Bitrate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- this.Bitrate.Width = 75;
- //
- // DRC
- //
- this.DRC.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.DRC.DataPropertyName = "DRC";
- this.DRC.FillWeight = 96.36334F;
- this.DRC.HeaderText = "DRC";
- this.DRC.Name = "DRC";
- this.DRC.ReadOnly = true;
- this.DRC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
- this.DRC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // Gain
- //
- this.Gain.DataPropertyName = "Gain";
- this.Gain.HeaderText = "Gain (dB)";
- this.Gain.Name = "Gain";
- this.Gain.ReadOnly = true;
- this.Gain.Width = 60;
- //
// btn_AdvancedAudio
//
this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
@@ -399,10 +331,78 @@ namespace Handbrake.Controls
// mnu_ClearAll
//
this.mnu_ClearAll.Name = "mnu_ClearAll";
- this.mnu_ClearAll.Size = new System.Drawing.Size(152, 22);
+ this.mnu_ClearAll.Size = new System.Drawing.Size(118, 22);
this.mnu_ClearAll.Text = "Clear All";
this.mnu_ClearAll.Click += new System.EventHandler(this.Mnu_clear_all_click);
//
+ // Source
+ //
+ this.Source.DataPropertyName = "TrackDisplay";
+ this.Source.FillWeight = 49.69727F;
+ this.Source.HeaderText = "Source";
+ this.Source.Name = "Source";
+ this.Source.ReadOnly = true;
+ this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Source.Width = 170;
+ //
+ // AudioCodec
+ //
+ this.AudioCodec.DataPropertyName = "AudioEncoderDisplayValue";
+ this.AudioCodec.HeaderText = "Audio Codec";
+ this.AudioCodec.Name = "AudioCodec";
+ this.AudioCodec.ReadOnly = true;
+ this.AudioCodec.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.AudioCodec.Width = 120;
+ //
+ // Mixdown
+ //
+ this.Mixdown.DataPropertyName = "AudioMixdownDisplayValue";
+ this.Mixdown.FillWeight = 49.69727F;
+ this.Mixdown.HeaderText = "Mixdown";
+ this.Mixdown.Name = "Mixdown";
+ this.Mixdown.ReadOnly = true;
+ this.Mixdown.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Mixdown.Width = 150;
+ //
+ // Samplerate
+ //
+ this.Samplerate.DataPropertyName = "SampleRateDisplayValue";
+ this.Samplerate.FillWeight = 49.69727F;
+ this.Samplerate.HeaderText = "Samplerate";
+ this.Samplerate.Name = "Samplerate";
+ this.Samplerate.ReadOnly = true;
+ this.Samplerate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Samplerate.Width = 75;
+ //
+ // Bitrate
+ //
+ this.Bitrate.DataPropertyName = "BitRateDisplayValue";
+ this.Bitrate.FillWeight = 49.69727F;
+ this.Bitrate.HeaderText = "Bitrate";
+ this.Bitrate.Name = "Bitrate";
+ this.Bitrate.ReadOnly = true;
+ this.Bitrate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Bitrate.Width = 75;
+ //
+ // DRC
+ //
+ this.DRC.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.DRC.DataPropertyName = "DRC";
+ this.DRC.FillWeight = 96.36334F;
+ this.DRC.HeaderText = "DRC";
+ this.DRC.Name = "DRC";
+ this.DRC.ReadOnly = true;
+ this.DRC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.DRC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ //
+ // Gain
+ //
+ this.Gain.DataPropertyName = "Gain";
+ this.Gain.HeaderText = "Gain (dB)";
+ this.Gain.Name = "Gain";
+ this.Gain.ReadOnly = true;
+ this.Gain.Width = 60;
+ //
// AudioPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@@ -446,13 +446,6 @@ namespace Handbrake.Controls
private System.Windows.Forms.DataGridView audioList;
private System.Windows.Forms.ToolTip ToolTips;
private System.Windows.Forms.Button btn_AdvancedAudio;
- private System.Windows.Forms.DataGridViewTextBoxColumn Source;
- private System.Windows.Forms.DataGridViewTextBoxColumn AudioCodec;
- private System.Windows.Forms.DataGridViewTextBoxColumn Mixdown;
- private System.Windows.Forms.DataGridViewTextBoxColumn Samplerate;
- private System.Windows.Forms.DataGridViewTextBoxColumn Bitrate;
- private System.Windows.Forms.DataGridViewTextBoxColumn DRC;
- private System.Windows.Forms.DataGridViewTextBoxColumn Gain;
private System.Windows.Forms.ToolStripMenuItem audioList_MoveToTop;
private System.Windows.Forms.ToolStripMenuItem audioList_MoveToBottom;
private wyDay.Controls.SplitButton btn_addAudioTrack;
@@ -461,5 +454,12 @@ namespace Handbrake.Controls
private wyDay.Controls.SplitButton btn_RemoveTrack;
private System.Windows.Forms.ContextMenuStrip RemoveTrackMenu;
private System.Windows.Forms.ToolStripMenuItem mnu_ClearAll;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Source;
+ private System.Windows.Forms.DataGridViewTextBoxColumn AudioCodec;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Mixdown;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Samplerate;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Bitrate;
+ private System.Windows.Forms.DataGridViewTextBoxColumn DRC;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Gain;
}
}
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs
index c25d86cb9..59464077c 100644
--- a/win/CS/Controls/AudioPanel.cs
+++ b/win/CS/Controls/AudioPanel.cs
@@ -167,7 +167,7 @@ namespace Handbrake.Controls
{
ClearAudioList();
- if (tracks == null)
+ if (tracks == null || (drp_audioTrack.SelectedItem != null && drp_audioTrack.SelectedItem.ToString() == AudioHelper.NoneFound.Description))
return;
foreach (AudioTrack track in tracks)
@@ -248,6 +248,9 @@ namespace Handbrake.Controls
/// </param>
private void ControlChanged(object sender, EventArgs e)
{
+ Control ctl = (Control)sender;
+
+ // Some Sanity Checking
if (audioList.SelectedRows.Count == 0)
{
return;
@@ -259,8 +262,7 @@ namespace Handbrake.Controls
return;
}
- Control ctl = (Control)sender;
-
+ // Handle the changed control and selected audio track.
switch (ctl.Name)
{
case "drp_audioTrack":
@@ -980,7 +982,8 @@ namespace Handbrake.Controls
}
// If the track isn't DTS, and the encoder is, change it.
- if (track.Encoder == AudioEncoder.DtsPassthrough && !track.ScannedTrack.Format.Contains("DTS"))
+ if (track.Encoder == AudioEncoder.DtsPassthrough || track.Encoder == AudioEncoder.DtsHDPassthrough
+ && !track.ScannedTrack.Format.Contains("DTS"))
{
return true;
}
diff --git a/win/CS/Controls/AudioPanel.resx b/win/CS/Controls/AudioPanel.resx
index 79c291869..696d4eed5 100644
--- a/win/CS/Controls/AudioPanel.resx
+++ b/win/CS/Controls/AudioPanel.resx
@@ -147,9 +147,6 @@
<metadata name="Gain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>330, 16</value>
- </metadata>
<metadata name="AddTrackMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>427, 16</value>
</metadata>