summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-10-03 21:28:29 +0000
committersr55 <[email protected]>2010-10-03 21:28:29 +0000
commite0d0eb615edae49d48e99f76b7fa926d571695ea (patch)
tree1069cd1e986f7ec59d0ed6f5b3c6f14e686585ac /win
parent24e8e89117e094f5dd5df782e10dd08ce752509e (diff)
WinGui:
- Update the Subtitles panel to handle the previous revision fix to the CLI git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3566 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Controls/Subtitles.cs32
1 files changed, 11 insertions, 21 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index 2a22dee52..29c127244 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -80,10 +80,11 @@ namespace Handbrake.Controls
string srtLang = String.Empty;
string srtDefault = String.Empty;
int srtCount = 0;
+ int subCount = 0;
foreach (SubtitleInfo item in subList)
{
- string itemToAdd, trackId;
+ string itemToAdd;
if (item.IsSrtSubtitle) // We have an SRT file
{
@@ -103,41 +104,30 @@ namespace Handbrake.Controls
}
else // We have Bitmap or CC
{
- string[] tempSub;
+ subCount++;
// Find --subtitle <string>
if (item.Track.Contains("Foreign Audio Search"))
itemToAdd = "scan";
else
{
- tempSub = item.Track.Split(' ');
+ string[] tempSub = item.Track.Split(' ');
itemToAdd = tempSub[0];
}
subtitleTracks += subtitleTracks == string.Empty ? itemToAdd : "," + itemToAdd;
// Find --subtitle-forced
- itemToAdd = string.Empty;
- tempSub = item.Track.Split(' ');
- trackId = tempSub[0];
-
if (item.Forced)
- itemToAdd = trackId;
-
- if (itemToAdd != string.Empty)
- subtitleForced += subtitleForced == string.Empty ? itemToAdd : "," + itemToAdd;
-
- // Find --subtitle-burn and --subtitle-default
- trackId = tempSub[0];
+ subtitleForced += subtitleForced == string.Empty ? subCount.ToString() : "," + subCount;
- if (trackId.Trim() == "Foreign") // foreign audio search
- trackId = "scan";
+ // Find --subtitle-burn
+ if (item.Burned)
+ subtitleBurn = subCount.ToString();
- if (item.Burned) // burn
- subtitleBurn = trackId;
-
- if (item.Default) // default
- subtitleDefault = trackId;
+ // Find --subtitle-default
+ if (item.Default)
+ subtitleDefault = subCount.ToString();
}
}