diff options
author | sr55 <[email protected]> | 2011-10-26 19:22:34 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-10-26 19:22:34 +0000 |
commit | 9ea0a3e96c19b22d53430a81e5cb8271bd5a1942 (patch) | |
tree | e3322c5c143ccd26cb68be0c54f88dd31cc0f3b0 | |
parent | 9539f510c2a59b4e220f2c5e3e09bfc53cf1742b (diff) |
WinGui: Some behavioural fixes to the audio panel controls.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4323 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/Controls/AudioPanel.Designer.cs | 4 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 18 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.resx | 3 |
3 files changed, 15 insertions, 10 deletions
diff --git a/win/CS/Controls/AudioPanel.Designer.cs b/win/CS/Controls/AudioPanel.Designer.cs index 09d35c910..7f3c58fc9 100644 --- a/win/CS/Controls/AudioPanel.Designer.cs +++ b/win/CS/Controls/AudioPanel.Designer.cs @@ -157,6 +157,7 @@ namespace Handbrake.Controls // drp_audioMix
//
this.drp_audioMix.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drp_audioMix.Enabled = false;
this.drp_audioMix.FormattingEnabled = true;
this.drp_audioMix.Items.AddRange(new object[] {
"Automatic",
@@ -189,6 +190,7 @@ namespace Handbrake.Controls // drp_audioBitrate
//
this.drp_audioBitrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drp_audioBitrate.Enabled = false;
this.drp_audioBitrate.FormattingEnabled = true;
this.drp_audioBitrate.Items.AddRange(new object[] {
"32",
@@ -211,6 +213,7 @@ namespace Handbrake.Controls // drp_audioSample
//
this.drp_audioSample.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drp_audioSample.Enabled = false;
this.drp_audioSample.FormattingEnabled = true;
this.drp_audioSample.Items.AddRange(new object[] {
"Auto",
@@ -336,6 +339,7 @@ namespace Handbrake.Controls // btn_AdvancedAudio
//
this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
+ this.btn_AdvancedAudio.Enabled = false;
this.btn_AdvancedAudio.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_AdvancedAudio.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
this.btn_AdvancedAudio.Location = new System.Drawing.Point(607, 65);
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 8463e9969..e07cf1e3a 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -136,7 +136,7 @@ namespace Handbrake.Controls drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.ffflac));
}
- if (!drp_audioEncoder.Text.Contains(oldval))
+ if (!drp_audioEncoder.Items.Contains(oldval))
drp_audioEncoder.SelectedIndex = 0;
else
drp_audioEncoder.SelectedItem = oldval;
@@ -248,15 +248,19 @@ namespace Handbrake.Controls // Some Sanity Checking
if (audioList.SelectedRows.Count == 0)
{
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;
return;
}
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;
}
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
+
// Handle the changed control and selected audio track.
switch (ctl.Name)
{
@@ -491,11 +495,11 @@ namespace Handbrake.Controls {
RemoveTrack();
- if (this.AudioTracks.Count == 0)
- {
- drp_audioMix.Enabled =
- drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
- }
+ //if (this.AudioTracks.Count == 0)
+ //{
+ // drp_audioMix.Enabled =
+ // drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
+ //}
}
/// <summary>
@@ -714,7 +718,7 @@ namespace Handbrake.Controls {
this.AudioTracks.Clear();
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
+ //drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
if (this.AudioListChanged != null)
this.AudioListChanged(this, new EventArgs());
diff --git a/win/CS/Controls/AudioPanel.resx b/win/CS/Controls/AudioPanel.resx index a361bc401..696d4eed5 100644 --- a/win/CS/Controls/AudioPanel.resx +++ b/win/CS/Controls/AudioPanel.resx @@ -123,9 +123,6 @@ <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="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>330, 16</value>
- </metadata>
<metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 17</value>
</metadata>
|