summaryrefslogtreecommitdiffstats
path: root/win/C#/Controls
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-07-18 11:21:42 +0000
committersr55 <[email protected]>2009-07-18 11:21:42 +0000
commit9148e415545807b62354fd26cb7e640fb8d3ee7e (patch)
tree5f4c975f9f0af4e0ac4d1c91d5d8d4da77b260f5 /win/C#/Controls
parent5a1dbbd9e19859d8de91c1e99ecb6577929deed2 (diff)
WinGui:
- Added Subtitles support for the last check-in. - Fixed a few bugs in the new Audio handling code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2711 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls')
-rw-r--r--win/C#/Controls/AudioPanel.cs12
-rw-r--r--win/C#/Controls/Subtitles.cs18
2 files changed, 27 insertions, 3 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs
index c846f5055..ef8d87048 100644
--- a/win/C#/Controls/AudioPanel.cs
+++ b/win/C#/Controls/AudioPanel.cs
@@ -244,8 +244,16 @@ namespace Handbrake.Controls
i++;
}
- foreach (ListViewItem item in lv_audioList.Items)
- item.SubItems[1].Text = drp_audioTrack.SelectedItem.ToString();
+ if (drp_audioTrack.SelectedItem != null)
+ foreach (ListViewItem item in lv_audioList.Items)
+ item.SubItems[1].Text = drp_audioTrack.SelectedItem.ToString();
+ else
+ {
+ drp_audioTrack.SelectedIndex = 0;
+ if (drp_audioTrack.SelectedItem != null)
+ foreach (ListViewItem item in lv_audioList.Items)
+ item.SubItems[1].Text = drp_audioTrack.SelectedItem.ToString();
+ }
}
else
drp_audioTrack.SelectedIndex = 0; // "Use Foreign language audio and Subtitles"
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index 9036a6c72..e4142bd44 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -24,7 +24,23 @@ namespace Handbrake.Controls
private int FileContainer;
public void setSubtitleTrackAuto()
{
- //TODO
+ // Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
+ if (Properties.Settings.Default.NativeLanguage != "Any")
+ {
+ if (!Properties.Settings.Default.DubAudio) // We need to add a subtitle track if this is false.
+ {
+ int i = 0;
+ foreach (object item in drp_subtitleTracks.Items)
+ {
+ if (item.ToString().Contains(Properties.Settings.Default.NativeLanguage))
+ drp_subtitleTracks.SelectedIndex = i;
+
+ i++;
+ }
+
+ btn_addSubTrack_Click(this, new EventArgs());
+ }
+ }
}
public void setContainer(int value)
{