diff options
author | sr55 <[email protected]> | 2011-04-29 20:04:21 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-04-29 20:04:21 +0000 |
commit | 1cd4e576275a12275601da3dce5a2b11a638644d (patch) | |
tree | d7eb77d103657ba5abafb8d6733df34dbaaf1da7 | |
parent | 912b0faed188f7908718833f0ec27b343f0d2a53 (diff) |
WinGui:
- Fixes to the Audio Panel. Should fix some possible enum helper exceptions and properly select the mixdown.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3969 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 38 | ||||
-rw-r--r-- | win/CS/frmMain.Designer.cs | 14 | ||||
-rw-r--r-- | win/CS/frmMain.resx | 21 |
3 files changed, 42 insertions, 31 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 736789f37..5d5c59a85 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -269,8 +269,7 @@ namespace Handbrake.Controls }
break;
case "drp_audioEncoder":
- SetMixDown();
- SetBitrate();
+ SetMixDown(EnumHelper<Mixdown>.GetDescription(track.MixDown));
// Configure the widgets with values
if (drp_audioEncoder.Text.Contains(AC3Passthru) || drp_audioEncoder.Text.Contains(DTSPassthru))
@@ -287,19 +286,22 @@ namespace Handbrake.Controls // Update an item in the Audio list if required.
track.Encoder = EnumHelper<AudioEncoder>.GetValue(drp_audioEncoder.Text);
- // Just make sure we don't have the wrong mixdown set, if we do fix it.
- if (track.MixDown == HandBrake.ApplicationServices.Model.Encoding.Mixdown.Ac3Passthrough || track.MixDown == HandBrake.ApplicationServices.Model.Encoding.Mixdown.DtsPassthrough)
- {
- if (track.Encoder != AudioEncoder.Ac3Passthrough && track.Encoder != AudioEncoder.DtsPassthrough)
- {
- drp_audioMix.SelectedItem = "Dolby Pro Logic II";
- }
- }
+ //// Just make sure we don't have the wrong mixdown set, if we do fix it.
+ //if (track.MixDown == HandBrake.ApplicationServices.Model.Encoding.Mixdown.Ac3Passthrough || track.MixDown == HandBrake.ApplicationServices.Model.Encoding.Mixdown.DtsPassthrough)
+ //{
+ // if (track.Encoder != AudioEncoder.Ac3Passthrough && track.Encoder != AudioEncoder.DtsPassthrough)
+ // {
+ // drp_audioMix.SelectedItem = "Dolby Pro Logic II";
+ // }
+ //}
break;
case "drp_audioMix":
SetBitrate();
- track.MixDown = EnumHelper<Mixdown>.GetValue(drp_audioMix.Text);
+ if (drp_audioMix.SelectedItem != null)
+ {
+ track.MixDown = EnumHelper<Mixdown>.GetValue(drp_audioMix.Text);
+ }
break;
case "drp_audioSample":
@@ -730,7 +732,10 @@ namespace Handbrake.Controls /// <summary>
/// Set the mixdown dropdown
/// </summary>
- private void SetMixDown()
+ /// <param name="currentMixdown">
+ /// The current Mixdown.
+ /// </param>
+ private void SetMixDown(string currentMixdown)
{
drp_audioMix.Items.Clear();
drp_audioMix.Items.Add("Mono");
@@ -746,19 +751,23 @@ namespace Handbrake.Controls case "AAC (faac)":
drp_audioMix.Items.Remove(AC3Passthru);
drp_audioMix.Items.Remove(DTSPassthru);
+ drp_audioMix.SelectedItem = currentMixdown ?? "Dolby Pro Logic II";
break;
case "MP3 (lame)":
drp_audioMix.Items.Remove("6 Channel Discrete");
drp_audioMix.Items.Remove(AC3Passthru);
drp_audioMix.Items.Remove(DTSPassthru);
+ drp_audioMix.SelectedItem = currentMixdown ?? "Dolby Pro Logic II";
break;
case "Vorbis (vorbis)":
drp_audioMix.Items.Remove(AC3Passthru);
drp_audioMix.Items.Remove(DTSPassthru);
+ drp_audioMix.SelectedItem = currentMixdown ?? "Dolby Pro Logic II";
break;
case "AC3 (ffmpeg)":
drp_audioMix.Items.Remove(AC3Passthru);
drp_audioMix.Items.Remove(DTSPassthru);
+ drp_audioMix.SelectedItem = currentMixdown ?? "Dolby Pro Logic II";
break;
case "AC3 Passthru":
drp_audioMix.SelectedItem = AC3Passthru;
@@ -767,6 +776,11 @@ namespace Handbrake.Controls drp_audioMix.SelectedItem = DTSPassthru;
break;
}
+
+ if (drp_audioMix.SelectedItem == null)
+ {
+ drp_audioMix.SelectedItem = "Dolby Pro Logic II";
+ }
}
#endregion
diff --git a/win/CS/frmMain.Designer.cs b/win/CS/frmMain.Designer.cs index 3ef2755df..129271dcd 100644 --- a/win/CS/frmMain.Designer.cs +++ b/win/CS/frmMain.Designer.cs @@ -287,7 +287,7 @@ namespace Handbrake this.check_turbo.Enabled = false;
this.check_turbo.Location = new System.Drawing.Point(495, 134);
this.check_turbo.Name = "check_turbo";
- this.check_turbo.Size = new System.Drawing.Size(99, 17);
+ this.check_turbo.Size = new System.Drawing.Size(101, 17);
this.check_turbo.TabIndex = 9;
this.check_turbo.Text = "Turbo first Pass";
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");
@@ -557,7 +557,7 @@ namespace Handbrake this.radio_cq.BackColor = System.Drawing.Color.Transparent;
this.radio_cq.Location = new System.Drawing.Point(366, 37);
this.radio_cq.Name = "radio_cq";
- this.radio_cq.Size = new System.Drawing.Size(105, 17);
+ this.radio_cq.Size = new System.Drawing.Size(110, 17);
this.radio_cq.TabIndex = 3;
this.radio_cq.Text = "Constant Quality:";
this.ToolTip.SetToolTip(this.radio_cq, resources.GetString("radio_cq.ToolTip"));
@@ -571,7 +571,7 @@ namespace Handbrake this.radio_avgBitrate.Checked = true;
this.radio_avgBitrate.Location = new System.Drawing.Point(367, 108);
this.radio_avgBitrate.Name = "radio_avgBitrate";
- this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);
+ this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);
this.radio_avgBitrate.TabIndex = 4;
this.radio_avgBitrate.TabStop = true;
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";
@@ -585,7 +585,7 @@ namespace Handbrake this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;
this.check_2PassEncode.Location = new System.Drawing.Point(385, 134);
this.check_2PassEncode.Name = "check_2PassEncode";
- this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);
+ this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);
this.check_2PassEncode.TabIndex = 10;
this.check_2PassEncode.Text = "2-Pass Encoding";
this.ToolTip.SetToolTip(this.check_2PassEncode, resources.GetString("check_2PassEncode.ToolTip"));
@@ -873,7 +873,7 @@ namespace Handbrake this.radio_constantFramerate.Checked = true;
this.radio_constantFramerate.Location = new System.Drawing.Point(0, 0);
this.radio_constantFramerate.Name = "radio_constantFramerate";
- this.radio_constantFramerate.Size = new System.Drawing.Size(117, 17);
+ this.radio_constantFramerate.Size = new System.Drawing.Size(122, 17);
this.radio_constantFramerate.TabIndex = 17;
this.radio_constantFramerate.TabStop = true;
this.radio_constantFramerate.Text = "Constant Framerate";
@@ -885,7 +885,7 @@ namespace Handbrake this.radio_peakAndVariable.BackColor = System.Drawing.Color.Transparent;
this.radio_peakAndVariable.Location = new System.Drawing.Point(0, 23);
this.radio_peakAndVariable.Name = "radio_peakAndVariable";
- this.radio_peakAndVariable.Size = new System.Drawing.Size(113, 17);
+ this.radio_peakAndVariable.Size = new System.Drawing.Size(116, 17);
this.radio_peakAndVariable.TabIndex = 19;
this.radio_peakAndVariable.Text = "Variable Framerate";
this.radio_peakAndVariable.UseVisualStyleBackColor = false;
@@ -963,7 +963,7 @@ namespace Handbrake this.Check_ChapterMarkers.BackColor = System.Drawing.Color.Transparent;
this.Check_ChapterMarkers.Location = new System.Drawing.Point(16, 32);
this.Check_ChapterMarkers.Name = "Check_ChapterMarkers";
- this.Check_ChapterMarkers.Size = new System.Drawing.Size(136, 17);
+ this.Check_ChapterMarkers.Size = new System.Drawing.Size(140, 17);
this.Check_ChapterMarkers.TabIndex = 4;
this.Check_ChapterMarkers.Text = "Create chapter markers";
this.Check_ChapterMarkers.UseVisualStyleBackColor = false;
diff --git a/win/CS/frmMain.resx b/win/CS/frmMain.resx index 9ec365918..a737bb095 100644 --- a/win/CS/frmMain.resx +++ b/win/CS/frmMain.resx @@ -640,18 +640,6 @@ Clear the text box below to return to the internal query generation.</value> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>98</value>
</metadata>
- <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>664, 15</value>
- </metadata>
- <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>310, 54</value>
- </metadata>
- <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>423, 54</value>
- </metadata>
- <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>98</value>
- </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA
@@ -1031,4 +1019,13 @@ Clear the text box below to return to the internal query generation.</value> AAD6AQAA4AEAAMABAACAAQAAgAEAAMBBAADAYQAAjGEAAIRhAADc+wAA3/8AAA==
</value>
</data>
+ <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>664, 15</value>
+ </metadata>
+ <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>310, 54</value>
+ </metadata>
+ <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>423, 54</value>
+ </metadata>
</root>
\ No newline at end of file |