diff options
author | sr55 <[email protected]> | 2009-06-15 21:32:19 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-15 21:32:19 +0000 |
commit | 28e0749e0dc68e0f652fcf257989619281ea5610 (patch) | |
tree | 352bfd85719848434646847ffedf69c7b446b181 /win/C#/Controls | |
parent | c7f4c7ee6076abcb296f01e6ce4f57434800a9fc (diff) |
WinGui:
- Moving from mkv to mp4 now leaves only 1 vobsub track on the list. Any others are removed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2538 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls')
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 34 |
1 files changed, 27 insertions, 7 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 }
}
- }
+ }
}
|