summaryrefslogtreecommitdiffstats
path: root/win/CS/Controls
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/Controls')
-rw-r--r--win/CS/Controls/Subtitles.Designer.cs161
-rw-r--r--win/CS/Controls/Subtitles.cs11
-rw-r--r--win/CS/Controls/Subtitles.resx12
3 files changed, 43 insertions, 141 deletions
diff --git a/win/CS/Controls/Subtitles.Designer.cs b/win/CS/Controls/Subtitles.Designer.cs
index b38b6e4d5..606c7c877 100644
--- a/win/CS/Controls/Subtitles.Designer.cs
+++ b/win/CS/Controls/Subtitles.Designer.cs
@@ -32,39 +32,30 @@
this.btn_addTrack = new System.Windows.Forms.Button();
this.btn_RemoveSubTrack = new System.Windows.Forms.Button();
this.lv_subList = new System.Windows.Forms.ListView();
- this.col_Source = new System.Windows.Forms.ColumnHeader();
- this.col_forced = new System.Windows.Forms.ColumnHeader();
- this.col_burned = new System.Windows.Forms.ColumnHeader();
- this.col_defaultTrack = new System.Windows.Forms.ColumnHeader();
- this.col_srtLang = new System.Windows.Forms.ColumnHeader();
- this.col_srtChar = new System.Windows.Forms.ColumnHeader();
- this.col_srtOffset = new System.Windows.Forms.ColumnHeader();
+ this.col_Source = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_forced = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_burned = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_defaultTrack = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_srtLang = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_srtChar = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.col_srtOffset = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.subMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_moveup = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_movedown = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.mnu_remove = new System.Windows.Forms.ToolStripMenuItem();
this.label68 = new System.Windows.Forms.Label();
- this.SubGroupBox = new System.Windows.Forms.GroupBox();
this.drp_subtitleTracks = new System.Windows.Forms.ComboBox();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
this.srt_offset = new System.Windows.Forms.NumericUpDown();
this.srt_lang = new System.Windows.Forms.ComboBox();
- this.label8 = new System.Windows.Forms.Label();
this.srt_charcode = new System.Windows.Forms.ComboBox();
- this.label4 = new System.Windows.Forms.Label();
this.check_forced = new System.Windows.Forms.CheckBox();
- this.label7 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
this.check_default = new System.Windows.Forms.CheckBox();
this.check_burned = new System.Windows.Forms.CheckBox();
this.btn_srtAdd = new System.Windows.Forms.Button();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.subMenu.SuspendLayout();
- this.SubGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.srt_offset)).BeginInit();
this.SuspendLayout();
//
@@ -110,10 +101,10 @@
this.lv_subList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lv_subList.HideSelection = false;
this.lv_subList.LabelWrap = false;
- this.lv_subList.Location = new System.Drawing.Point(16, 146);
+ this.lv_subList.Location = new System.Drawing.Point(16, 96);
this.lv_subList.MultiSelect = false;
this.lv_subList.Name = "lv_subList";
- this.lv_subList.Size = new System.Drawing.Size(688, 137);
+ this.lv_subList.Size = new System.Drawing.Size(688, 186);
this.lv_subList.TabIndex = 70;
this.lv_subList.UseCompatibleStateImageBehavior = false;
this.lv_subList.View = System.Windows.Forms.View.Details;
@@ -122,7 +113,7 @@
// col_Source
//
this.col_Source.Text = "Track";
- this.col_Source.Width = 139;
+ this.col_Source.Width = 160;
//
// col_forced
//
@@ -142,16 +133,17 @@
// col_srtLang
//
this.col_srtLang.Text = "Srt Lang";
+ this.col_srtLang.Width = 120;
//
// col_srtChar
//
this.col_srtChar.Text = "Srt CharCode";
- this.col_srtChar.Width = 110;
+ this.col_srtChar.Width = 120;
//
// col_srtOffset
//
- this.col_srtOffset.Text = "Srt Offset";
- this.col_srtOffset.Width = 70;
+ this.col_srtOffset.Text = "Srt Offset (ms)";
+ this.col_srtOffset.Width = 90;
//
// subMenu
//
@@ -201,67 +193,16 @@
this.label68.TabIndex = 67;
this.label68.Text = "Subtitles";
//
- // SubGroupBox
- //
- this.SubGroupBox.BackColor = System.Drawing.Color.Transparent;
- this.SubGroupBox.Controls.Add(this.drp_subtitleTracks);
- this.SubGroupBox.Controls.Add(this.label10);
- this.SubGroupBox.Controls.Add(this.label9);
- this.SubGroupBox.Controls.Add(this.label2);
- this.SubGroupBox.Controls.Add(this.srt_offset);
- this.SubGroupBox.Controls.Add(this.srt_lang);
- this.SubGroupBox.Controls.Add(this.label8);
- this.SubGroupBox.Controls.Add(this.srt_charcode);
- this.SubGroupBox.Controls.Add(this.label4);
- this.SubGroupBox.Controls.Add(this.check_forced);
- this.SubGroupBox.Controls.Add(this.label7);
- this.SubGroupBox.Controls.Add(this.label3);
- this.SubGroupBox.Controls.Add(this.check_default);
- this.SubGroupBox.Controls.Add(this.check_burned);
- this.SubGroupBox.Location = new System.Drawing.Point(16, 67);
- this.SubGroupBox.Name = "SubGroupBox";
- this.SubGroupBox.Size = new System.Drawing.Size(688, 73);
- this.SubGroupBox.TabIndex = 72;
- this.SubGroupBox.TabStop = false;
- this.SubGroupBox.Text = "Selected Track: New Track";
- //
// drp_subtitleTracks
//
this.drp_subtitleTracks.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.drp_subtitleTracks.FormattingEnabled = true;
- this.drp_subtitleTracks.Location = new System.Drawing.Point(6, 35);
+ this.drp_subtitleTracks.Location = new System.Drawing.Point(16, 69);
this.drp_subtitleTracks.Name = "drp_subtitleTracks";
- this.drp_subtitleTracks.Size = new System.Drawing.Size(164, 21);
+ this.drp_subtitleTracks.Size = new System.Drawing.Size(162, 21);
this.drp_subtitleTracks.TabIndex = 74;
this.drp_subtitleTracks.SelectedIndexChanged += new System.EventHandler(this.DrpSubtitleTracksSelectedIndexChanged);
//
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(308, 19);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(42, 13);
- this.label10.TabIndex = 81;
- this.label10.Text = "Default";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(248, 19);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(54, 13);
- this.label9.TabIndex = 80;
- this.label9.Text = "Burned In";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(371, 19);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(71, 13);
- this.label2.TabIndex = 72;
- this.label2.Text = "Srt Language";
- //
// srt_offset
//
this.srt_offset.Enabled = false;
@@ -270,7 +211,7 @@
0,
0,
0});
- this.srt_offset.Location = new System.Drawing.Point(549, 35);
+ this.srt_offset.Location = new System.Drawing.Point(620, 70);
this.srt_offset.Maximum = new decimal(new int[] {
1000000000,
0,
@@ -291,21 +232,12 @@
this.srt_lang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.srt_lang.Enabled = false;
this.srt_lang.FormattingEnabled = true;
- this.srt_lang.Location = new System.Drawing.Point(356, 35);
+ this.srt_lang.Location = new System.Drawing.Point(371, 69);
this.srt_lang.Name = "srt_lang";
- this.srt_lang.Size = new System.Drawing.Size(103, 21);
+ this.srt_lang.Size = new System.Drawing.Size(114, 21);
this.srt_lang.TabIndex = 50;
this.srt_lang.SelectedIndexChanged += new System.EventHandler(this.SrtLangSelectedIndexChanged);
//
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(177, 19);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(65, 13);
- this.label8.TabIndex = 79;
- this.label8.Text = "Forced Only";
- //
// srt_charcode
//
this.srt_charcode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -343,53 +275,26 @@
"UTF-8",
"UTF-16",
"UTF-32"});
- this.srt_charcode.Location = new System.Drawing.Point(465, 35);
+ this.srt_charcode.Location = new System.Drawing.Point(495, 69);
this.srt_charcode.Name = "srt_charcode";
- this.srt_charcode.Size = new System.Drawing.Size(78, 21);
+ this.srt_charcode.Size = new System.Drawing.Size(101, 21);
this.srt_charcode.TabIndex = 73;
this.srt_charcode.SelectedIndexChanged += new System.EventHandler(this.SrtCharcodeSelectedIndexChanged);
//
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(548, 19);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(62, 13);
- this.label4.TabIndex = 76;
- this.label4.Text = "Offset (ms)";
- //
// check_forced
//
this.check_forced.AutoSize = true;
- this.check_forced.Location = new System.Drawing.Point(199, 38);
+ this.check_forced.Location = new System.Drawing.Point(208, 72);
this.check_forced.Name = "check_forced";
this.check_forced.Size = new System.Drawing.Size(15, 14);
this.check_forced.TabIndex = 75;
this.check_forced.UseVisualStyleBackColor = true;
this.check_forced.CheckedChanged += new System.EventHandler(this.CheckForcedCheckedChanged);
//
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(69, 19);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(37, 13);
- this.label7.TabIndex = 78;
- this.label7.Text = "Track:";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(471, 19);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(58, 13);
- this.label3.TabIndex = 74;
- this.label3.Text = "Char Code";
- //
// check_default
//
this.check_default.AutoSize = true;
- this.check_default.Location = new System.Drawing.Point(320, 38);
+ this.check_default.Location = new System.Drawing.Point(334, 72);
this.check_default.Name = "check_default";
this.check_default.Size = new System.Drawing.Size(15, 14);
this.check_default.TabIndex = 77;
@@ -399,7 +304,7 @@
// check_burned
//
this.check_burned.AutoSize = true;
- this.check_burned.Location = new System.Drawing.Point(260, 38);
+ this.check_burned.Location = new System.Drawing.Point(274, 72);
this.check_burned.Name = "check_burned";
this.check_burned.Size = new System.Drawing.Size(15, 14);
this.check_burned.TabIndex = 76;
@@ -429,18 +334,22 @@
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.SubGroupBox);
+ this.Controls.Add(this.drp_subtitleTracks);
+ this.Controls.Add(this.srt_offset);
this.Controls.Add(this.btn_addTrack);
+ this.Controls.Add(this.srt_lang);
+ this.Controls.Add(this.srt_charcode);
this.Controls.Add(this.label68);
this.Controls.Add(this.btn_RemoveSubTrack);
this.Controls.Add(this.lv_subList);
this.Controls.Add(this.btn_srtAdd);
+ this.Controls.Add(this.check_forced);
+ this.Controls.Add(this.check_burned);
+ this.Controls.Add(this.check_default);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "Subtitles";
this.Size = new System.Drawing.Size(719, 300);
this.subMenu.ResumeLayout(false);
- this.SubGroupBox.ResumeLayout(false);
- this.SubGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.srt_offset)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -465,22 +374,14 @@
private System.Windows.Forms.Button btn_srtAdd;
private System.Windows.Forms.ColumnHeader col_srtChar;
private System.Windows.Forms.ColumnHeader col_srtOffset;
- private System.Windows.Forms.GroupBox SubGroupBox;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label label3;
internal System.Windows.Forms.ComboBox srt_charcode;
- private System.Windows.Forms.Label label2;
internal System.Windows.Forms.ComboBox srt_lang;
private System.Windows.Forms.NumericUpDown srt_offset;
private System.Windows.Forms.OpenFileDialog openFileDialog;
- private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox check_default;
private System.Windows.Forms.CheckBox check_burned;
private System.Windows.Forms.CheckBox check_forced;
internal System.Windows.Forms.ComboBox drp_subtitleTracks;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.Label label10;
private System.Windows.Forms.ColumnHeader col_srtLang;
private System.Windows.Forms.ToolTip toolTip;
}
diff --git a/win/CS/Controls/Subtitles.cs b/win/CS/Controls/Subtitles.cs
index 63c3afbe2..ba4195d29 100644
--- a/win/CS/Controls/Subtitles.cs
+++ b/win/CS/Controls/Subtitles.cs
@@ -243,6 +243,12 @@ namespace Handbrake.Controls
/// </param>
private void BtnAddSubTrackClick(object sender, EventArgs e)
{
+ if (drp_subtitleTracks.SelectedItem == null)
+ {
+ MessageBox.Show("No Subtitle Track Selected.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
// Logic
string forcedVal = check_forced.CheckState == CheckState.Checked ? "Yes" : "No";
string defaultSub = check_default.CheckState == CheckState.Checked ? "Yes" : "No";
@@ -362,7 +368,6 @@ namespace Handbrake.Controls
srt_offset.Value = track.SrtOffset;
srt_charcode.SelectedItem = track.SrtCharCode;
check_default.CheckState = track.Default ? CheckState.Checked : CheckState.Unchecked;
- SubGroupBox.Text = "Selected Track: " + track.Track;
}
else // We have Bitmap/CC
{
@@ -375,12 +380,8 @@ namespace Handbrake.Controls
check_forced.CheckState = track.Forced ? CheckState.Checked : CheckState.Unchecked;
check_burned.CheckState = track.Burned ? CheckState.Checked : CheckState.Unchecked;
check_default.CheckState = track.Default ? CheckState.Checked : CheckState.Unchecked;
- SubGroupBox.Text = "Selected Track: " +
- lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text;
}
}
- else
- SubGroupBox.Text = "Selected Track: None (Click \"Add\" to add another track to the list)";
}
#endregion
diff --git a/win/CS/Controls/Subtitles.resx b/win/CS/Controls/Subtitles.resx
index 9be4767af..dee1e5718 100644
--- a/win/CS/Controls/Subtitles.resx
+++ b/win/CS/Controls/Subtitles.resx
@@ -112,21 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
- <metadata name="subMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="subMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>113, 17</value>
</metadata>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
</root> \ No newline at end of file