diff options
author | sr55 <[email protected]> | 2008-04-17 20:29:32 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-04-17 20:29:32 +0000 |
commit | 823fe31bd3ab2e75e5687791b4571da299762f97 (patch) | |
tree | 57f997711532ae1e14808382b0829ea17bff9e0c | |
parent | 6b67ac13f0094118d8570b95723a77a780ea2a5e (diff) |
WinGui: A few hundred fixes to the Audio Tab, Preset Loader and Query Generator.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1424 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/Functions/Common.cs | 79 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 60 | ||||
-rw-r--r-- | win/C#/frmMain.resx | 6 |
3 files changed, 107 insertions, 38 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index 2772762da..825e614f1 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -289,12 +289,13 @@ namespace Handbrake.Functions // Audio Settings Tab
#region Audio
+ // Handle Track 1
if (presetQuery.AudioTrack1 == "")
mainWindow.drp_track1Audio.Text = "Automatic";
else
mainWindow.drp_track1Audio.Text = presetQuery.AudioTrack1;
-
+ // Handle Track 2
if (presetQuery.AudioEncoder2 != null) // Fix for loading in built in presets. Where 2 encoders but no tracks in the preset.
{
mainWindow.drp_track2Audio.Enabled = true;
@@ -303,7 +304,10 @@ namespace Handbrake.Functions mainWindow.drp_audenc_2.Enabled = true;
mainWindow.drp_audbit_2.Enabled = true;
mainWindow.drp_audsr_2.Text = "48";
- mainWindow.drp_track2Audio.Text = "Automatic";
+ if ((presetQuery.AudioTrack2 != null) && (presetQuery.AudioTrack2 != "None"))
+ mainWindow.drp_track2Audio.Text = presetQuery.AudioTrack2;
+ else
+ mainWindow.drp_track2Audio.Text = "Automatic";
}
else if (presetQuery.AudioTrack2 == "None")
{
@@ -322,6 +326,7 @@ namespace Handbrake.Functions mainWindow.drp_audbit_2.Enabled = true;
}
+ // Handle Track 3
if (presetQuery.AudioTrack3 == "None")
{
mainWindow.drp_track3Audio.SelectedIndex = 0;
@@ -329,6 +334,23 @@ namespace Handbrake.Functions mainWindow.drp_audmix_3.Enabled = false;
mainWindow.drp_audenc_3.Enabled = false;
mainWindow.drp_audbit_3.Enabled = false;
+ mainWindow.trackBar3.Enabled = false;
+
+ mainWindow.drp_track3Audio.Visible = false;
+ mainWindow.drp_audsr_3.Visible = false;
+ mainWindow.drp_audmix_3.Visible = false;
+ mainWindow.drp_audenc_3.Visible = false;
+ mainWindow.drp_audbit_3.Visible = false;
+ mainWindow.trackBar3.Visible = false;
+ mainWindow.lbl_drc3.Visible = false;
+ mainWindow.lbl_t3.Visible = false;
+
+ mainWindow.drp_track3Audio.Text = "None";
+ mainWindow.drp_audsr_3.Text = "";
+ mainWindow.drp_audmix_3.Text = "Automatic";
+ mainWindow.drp_audenc_3.Text = "";
+ mainWindow.drp_audbit_3.Text = "";
+ mainWindow.trackBar3.Value = 0;
}
else
@@ -338,8 +360,19 @@ namespace Handbrake.Functions mainWindow.drp_audmix_3.Enabled = true;
mainWindow.drp_audenc_3.Enabled = true;
mainWindow.drp_audbit_3.Enabled = true;
+ mainWindow.trackBar3.Enabled = true;
+
+ mainWindow.drp_track3Audio.Visible = true;
+ mainWindow.drp_audsr_3.Visible = true;
+ mainWindow.drp_audmix_3.Visible = true;
+ mainWindow.drp_audenc_3.Visible = true;
+ mainWindow.drp_audbit_3.Visible = true;
+ mainWindow.trackBar3.Visible = true;
+ mainWindow.lbl_drc3.Visible = true;
+ mainWindow.lbl_t3.Visible = true;
}
+ // Handle Track 4
if (presetQuery.AudioTrack4 == "None")
{
mainWindow.drp_track4Audio.SelectedIndex = 0;
@@ -347,6 +380,23 @@ namespace Handbrake.Functions mainWindow.drp_audmix_4.Enabled = false;
mainWindow.drp_audenc_4.Enabled = false;
mainWindow.drp_audbit_4.Enabled = false;
+ mainWindow.trackBar4.Enabled = false;
+
+ mainWindow.drp_track4Audio.Visible = false;
+ mainWindow.drp_audsr_4.Visible = false;
+ mainWindow.drp_audmix_4.Visible = false;
+ mainWindow.drp_audenc_4.Visible = false;
+ mainWindow.drp_audbit_4.Visible = false;
+ mainWindow.trackBar4.Visible = false;
+ mainWindow.lbl_drc4.Visible = false;
+ mainWindow.lbl_t4.Visible = false;
+
+ mainWindow.drp_track4Audio.Text = "None";
+ mainWindow.drp_audsr_4.Text = "";
+ mainWindow.drp_audmix_4.Text = "Automatic";
+ mainWindow.drp_audenc_4.Text = "";
+ mainWindow.drp_audbit_4.Text = "";
+ mainWindow.trackBar4.Value = 0;
}
else
{
@@ -355,8 +405,19 @@ namespace Handbrake.Functions mainWindow.drp_audmix_4.Enabled = true;
mainWindow.drp_audenc_4.Enabled = true;
mainWindow.drp_audbit_4.Enabled = true;
+ mainWindow.trackBar4.Enabled = true;
+
+ mainWindow.drp_track4Audio.Visible = true;
+ mainWindow.drp_audsr_4.Visible = true;
+ mainWindow.drp_audmix_4.Visible = true;
+ mainWindow.drp_audenc_4.Visible = true;
+ mainWindow.drp_audbit_4.Visible = true;
+ mainWindow.trackBar4.Visible = true;
+ mainWindow.lbl_drc4.Visible = true;
+ mainWindow.lbl_t4.Visible = true;
}
+ // Now lets start setting stuff
if (presetQuery.AudioEncoder1 != null)
mainWindow.drp_audenc_1.Text = presetQuery.AudioEncoder1;
mainWindow.drp_audenc_2.Text = presetQuery.AudioEncoder2;
@@ -841,6 +902,20 @@ namespace Handbrake.Functions else
audioSampleRate = audioSampleRate + "," + audioSampleRate2;
}
+ else
+ {
+ // All this is a hack, because when AppleTV is selected, there is no sample rate selected. so just add a 48
+ // It should probably be setup later so the GUI widget has the value 48 in it.
+
+ if ((track2 != "") && (track2 != "None"))
+ {
+ if (audioSampleRate == "")
+ audioSampleRate = " -R 48,48";
+ else
+ audioSampleRate = audioSampleRate + ",48";
+ }
+
+ }
if (audioSampleRate3 != "")
{
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 5814bda4a..211a0897a 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -37,7 +37,7 @@ namespace Handbrake this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label Label38;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
@@ -126,10 +126,10 @@ namespace Handbrake this.lbl_drc1 = new System.Windows.Forms.Label();
this.trackBar4 = new System.Windows.Forms.TrackBar();
this.drp_track4Audio = new System.Windows.Forms.ComboBox();
- this.label21 = new System.Windows.Forms.Label();
+ this.lbl_t4 = new System.Windows.Forms.Label();
this.trackBar3 = new System.Windows.Forms.TrackBar();
this.drp_track3Audio = new System.Windows.Forms.ComboBox();
- this.label18 = new System.Windows.Forms.Label();
+ this.lbl_t3 = new System.Windows.Forms.Label();
this.trackBar2 = new System.Windows.Forms.TrackBar();
this.label16 = new System.Windows.Forms.Label();
this.trackBar1 = new System.Windows.Forms.TrackBar();
@@ -623,9 +623,9 @@ namespace Handbrake //
// number
//
- dataGridViewCellStyle3.Format = "N0";
- dataGridViewCellStyle3.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -1295,14 +1295,14 @@ namespace Handbrake this.TabPage2.Controls.Add(this.drp_audenc_4);
this.TabPage2.Controls.Add(this.drp_audmix_4);
this.TabPage2.Controls.Add(this.drp_track4Audio);
- this.TabPage2.Controls.Add(this.label21);
+ this.TabPage2.Controls.Add(this.lbl_t4);
this.TabPage2.Controls.Add(this.trackBar3);
this.TabPage2.Controls.Add(this.drp_audsr_3);
this.TabPage2.Controls.Add(this.drp_audbit_3);
this.TabPage2.Controls.Add(this.drp_audenc_3);
this.TabPage2.Controls.Add(this.drp_audmix_3);
this.TabPage2.Controls.Add(this.drp_track3Audio);
- this.TabPage2.Controls.Add(this.label18);
+ this.TabPage2.Controls.Add(this.lbl_t3);
this.TabPage2.Controls.Add(this.trackBar2);
this.TabPage2.Controls.Add(this.label16);
this.TabPage2.Controls.Add(this.trackBar1);
@@ -1410,17 +1410,17 @@ namespace Handbrake this.drp_track4Audio.Visible = false;
this.drp_track4Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track4Audio_SelectedIndexChanged);
//
- // label21
+ // lbl_t4
//
- this.label21.AutoSize = true;
- this.label21.BackColor = System.Drawing.Color.Transparent;
- this.label21.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label21.Location = new System.Drawing.Point(13, 169);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(19, 13);
- this.label21.TabIndex = 32;
- this.label21.Text = "4:";
- this.label21.Visible = false;
+ this.lbl_t4.AutoSize = true;
+ this.lbl_t4.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_t4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_t4.Location = new System.Drawing.Point(13, 169);
+ this.lbl_t4.Name = "lbl_t4";
+ this.lbl_t4.Size = new System.Drawing.Size(19, 13);
+ this.lbl_t4.TabIndex = 32;
+ this.lbl_t4.Text = "4:";
+ this.lbl_t4.Visible = false;
//
// trackBar3
//
@@ -1449,17 +1449,17 @@ namespace Handbrake this.drp_track3Audio.Visible = false;
this.drp_track3Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track3Audio_SelectedIndexChanged);
//
- // label18
+ // lbl_t3
//
- this.label18.AutoSize = true;
- this.label18.BackColor = System.Drawing.Color.Transparent;
- this.label18.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label18.Location = new System.Drawing.Point(13, 131);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(19, 13);
- this.label18.TabIndex = 24;
- this.label18.Text = "3:";
- this.label18.Visible = false;
+ this.lbl_t3.AutoSize = true;
+ this.lbl_t3.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_t3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_t3.Location = new System.Drawing.Point(13, 131);
+ this.lbl_t3.Name = "lbl_t3";
+ this.lbl_t3.Size = new System.Drawing.Size(19, 13);
+ this.lbl_t3.TabIndex = 24;
+ this.lbl_t3.Text = "3:";
+ this.lbl_t3.Visible = false;
//
// trackBar2
//
@@ -3225,14 +3225,14 @@ namespace Handbrake internal System.Windows.Forms.ComboBox drp_audenc_4;
internal System.Windows.Forms.ComboBox drp_audmix_4;
internal System.Windows.Forms.ComboBox drp_track4Audio;
- internal System.Windows.Forms.Label label21;
+ internal System.Windows.Forms.Label lbl_t4;
internal System.Windows.Forms.TrackBar trackBar3;
internal System.Windows.Forms.ComboBox drp_audsr_3;
internal System.Windows.Forms.ComboBox drp_audbit_3;
internal System.Windows.Forms.ComboBox drp_audenc_3;
internal System.Windows.Forms.ComboBox drp_audmix_3;
internal System.Windows.Forms.ComboBox drp_track3Audio;
- internal System.Windows.Forms.Label label18;
+ internal System.Windows.Forms.Label lbl_t3;
internal System.Windows.Forms.TrackBar trackBar2;
internal System.Windows.Forms.Label label16;
internal System.Windows.Forms.Label lbl_drc1;
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index e9b8e49f4..e91100bb4 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -149,12 +149,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>223, 15</value>
</metadata>
|