diff options
author | sr55 <[email protected]> | 2008-04-12 21:52:20 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-04-12 21:52:20 +0000 |
commit | 86ac2730fdfbb06a65a34ea46156d01f7419e14c (patch) | |
tree | ad72466f72f539f768d9751ea638526a226e6254 /win/C#/frmMain.cs | |
parent | c97a8c7c2fae4324c905747d88c6bbe22f7e34b7 (diff) |
WinGui:
- Fixed issue where Audio encoder would be changed if chapter markers was enabled/disabled.
This was an issue with the function that populates the audio encoder drop downs based on the file extension
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1409 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 66 |
1 files changed, 54 insertions, 12 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index b3c131d6b..7930f5036 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1797,55 +1797,86 @@ namespace Handbrake // Audio system functions
private void setAudioByContainer(String path)
{
+ string oldval = "";
+
if ((path.EndsWith(".mp4")) || (path.EndsWith(".mp4")))
{
+ oldval = drp_audenc_1.Text;
drp_audenc_1.Items.Clear();
drp_audenc_1.Items.Add("AAC");
drp_audenc_1.Items.Add("AC3");
- drp_audenc_1.SelectedIndex = 0;
+ if ((oldval != "AAC") && (oldval != "AC3"))
+ drp_audenc_1.SelectedIndex = 0;
+ oldval = drp_audenc_2.Text;
drp_audenc_2.Items.Clear();
drp_audenc_2.Items.Add("AAC");
drp_audenc_2.Items.Add("AC3");
if (drp_audenc_2.Enabled)
- drp_audenc_2.SelectedIndex = 0;
+ {
+ if ((oldval != "AAC") && (oldval != "AC3"))
+ drp_audenc_2.SelectedIndex = 0;
+ }
+ oldval = drp_audenc_3.Text;
drp_audenc_3.Items.Clear();
drp_audenc_3.Items.Add("AAC");
drp_audenc_3.Items.Add("AC3");
if (drp_audenc_3.Enabled)
- drp_audenc_3.SelectedIndex = 0;
+ {
+ if ((oldval != "AAC") && (oldval != "AC3"))
+ drp_audenc_3.SelectedIndex = 0;
+ }
+ oldval = drp_audenc_4.Text;
drp_audenc_4.Items.Clear();
drp_audenc_4.Items.Add("AAC");
drp_audenc_4.Items.Add("AC3");
if (drp_audenc_4.Enabled)
- drp_audenc_4.SelectedIndex = 0;
+ {
+ if ((oldval != "AAC") && (oldval != "AC3"))
+ drp_audenc_4.SelectedIndex = 0;
+ }
}
else if (path.EndsWith(".avi"))
{
+ oldval = drp_audenc_1.Text;
drp_audenc_1.Items.Clear();
drp_audenc_1.Items.Add("MP3");
drp_audenc_1.Items.Add("AC3");
- drp_audenc_1.SelectedIndex = 0;
+ if ((oldval != "MP3") && (oldval != "AC3"))
+ drp_audenc_1.SelectedIndex = 0;
+ oldval = drp_audenc_2.Text;
drp_audenc_2.Items.Clear();
drp_audenc_2.Items.Add("MP3");
drp_audenc_2.Items.Add("AC3");
if (drp_audenc_2.Enabled)
- drp_audenc_2.SelectedIndex = 0;
+ {
+ if ((oldval != "MP3") && (oldval != "AC3"))
+ drp_audenc_2.SelectedIndex = 0;
+ }
+
+ oldval = drp_audenc_3.Text;
drp_audenc_3.Items.Clear();
drp_audenc_3.Items.Add("MP3");
drp_audenc_3.Items.Add("AC3");
if (drp_audenc_3.Enabled)
- drp_audenc_3.SelectedIndex = 0;
+ {
+ if ((oldval != "MP3") && (oldval != "AC3"))
+ drp_audenc_3.SelectedIndex = 0;
+ }
+ oldval = drp_audenc_4.Text;
drp_audenc_4.Items.Clear();
drp_audenc_4.Items.Add("MP3");
drp_audenc_4.Items.Add("AC3");
if (drp_audenc_4.Enabled)
- drp_audenc_4.SelectedIndex = 0;
+ {
+ if ((oldval != "MP3") && (oldval != "AC3"))
+ drp_audenc_4.SelectedIndex = 0;
+ }
}
else if (path.EndsWith(".ogm"))
{
@@ -1875,7 +1906,9 @@ namespace Handbrake drp_audenc_1.Items.Add("MP3");
drp_audenc_1.Items.Add("AC3");
drp_audenc_1.Items.Add("Vorbis");
- drp_audenc_1.SelectedIndex = 0;
+ if (drp_audenc_1.Text == "")
+ drp_audenc_1.SelectedIndex = 0;
+
drp_audenc_2.Items.Clear();
drp_audenc_2.Items.Add("AAC");
@@ -1883,7 +1916,10 @@ namespace Handbrake drp_audenc_2.Items.Add("AC3");
drp_audenc_2.Items.Add("Vorbis");
if (drp_audenc_2.Enabled)
- drp_audenc_2.SelectedIndex = 0;
+ {
+ if (drp_audenc_2.Text == "")
+ drp_audenc_2.SelectedIndex = 0;
+ }
drp_audenc_3.Items.Clear();
drp_audenc_3.Items.Add("AAC");
@@ -1891,7 +1927,10 @@ namespace Handbrake drp_audenc_3.Items.Add("AC3");
drp_audenc_3.Items.Add("Vorbis");
if (drp_audenc_3.Enabled)
- drp_audenc_3.SelectedIndex = 0;
+ {
+ if (drp_audenc_3.Text == "")
+ drp_audenc_3.SelectedIndex = 0;
+ }
drp_audenc_4.Items.Clear();
drp_audenc_4.Items.Add("AAC");
@@ -1899,7 +1938,10 @@ namespace Handbrake drp_audenc_4.Items.Add("AC3");
drp_audenc_4.Items.Add("Vorbis");
if (drp_audenc_4.Enabled)
- drp_audenc_4.SelectedIndex = 0;
+ {
+ if (drp_audenc_4.Text == "")
+ drp_audenc_4.SelectedIndex = 0;
+ }
}
}
|