diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 34 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 1 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 2 |
3 files changed, 28 insertions, 9 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index 4fa1186a3..56edcc852 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -13,8 +13,28 @@ namespace Handbrake.Controls public Subtitles()
{
InitializeComponent();
+
+ }
+
+ private int fileContainer;
+ public void setContainer(int value)
+ {
+ fileContainer = value;
+ Boolean trigger = false;
+ if (fileContainer != 2)
+ foreach (ListViewItem item in lv_subList.Items)
+ {
+ if (item.SubItems[1].Text.Contains("Bitmap"))
+ {
+ if (trigger)
+ lv_subList.Items.Remove(item);
+ trigger = true;
+ }
+ }
}
- public int setContainer { get; set; }
+
+
+
// Controls
private void btn_addSubTrack_Click(object sender, EventArgs e)
@@ -42,7 +62,7 @@ namespace Handbrake.Controls }
Boolean addTrack = true;
- if (setContainer == 0 || setContainer == 1)
+ if (fileContainer == 0 || fileContainer == 1)
{
burnedVal = "Yes"; // MP4 must have bitmap subs burned in.
@@ -53,7 +73,7 @@ namespace Handbrake.Controls if (item.SubItems[1].Text.Contains("Bitmap"))
{
MessageBox.Show(this,
- "MP4 files can only have 1 bitmap track. If you wish to have multiple bitmap tracks you should consider using MKV if suitable.",
+ "More than one vobsub is not supported in mp4... Your first vobsub track will now be used.",
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
addTrack = false;
}
@@ -114,7 +134,7 @@ namespace Handbrake.Controls private void drp_subtitleTracks_SelectedIndexChanged(object sender, EventArgs e)
{
- // Update an item in the list if required.
+ // Update an item in the list if required.
if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
{
lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text = drp_subtitleTracks.SelectedItem.ToString();
@@ -123,7 +143,7 @@ namespace Handbrake.Controls }
private void check_forced_CheckedChanged(object sender, EventArgs e)
{
- // Update an item in the list if required.
+ // Update an item in the list if required.
if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
{
lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[2].Text = check_forced.Checked ? "Yes" : "No";
@@ -132,7 +152,7 @@ namespace Handbrake.Controls }
private void check_burned_CheckedChanged(object sender, EventArgs e)
{
- // Update an item in the list if required.
+ // Update an item in the list if required.
if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
{
if (check_burned.Checked) // Make sure we only have 1 burned track
@@ -213,5 +233,5 @@ namespace Handbrake.Controls }
}
- }
+ }
}
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 11d50ff25..6bc52152c 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -1211,7 +1211,6 @@ namespace Handbrake this.Subtitles.BackColor = System.Drawing.Color.Transparent;
this.Subtitles.Location = new System.Drawing.Point(0, 0);
this.Subtitles.Name = "Subtitles";
- this.Subtitles.setContainer = 0;
this.Subtitles.Size = new System.Drawing.Size(722, 310);
this.Subtitles.TabIndex = 0;
//
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 40aa39034..91e509aff 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -973,7 +973,7 @@ namespace Handbrake setExtension(".mkv");
audioPanel.setAudioByContainer(drop_format.Text);
- Subtitles.setContainer = drop_format.SelectedIndex;
+ Subtitles.setContainer(drop_format.SelectedIndex);
string oldval;
if ((drop_format.Text.Contains("MP4")) || (drop_format.Text.Contains("M4V")))
|