diff options
author | sr55 <[email protected]> | 2009-07-18 11:21:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-07-18 11:21:42 +0000 |
commit | 9148e415545807b62354fd26cb7e640fb8d3ee7e (patch) | |
tree | 5f4c975f9f0af4e0ac4d1c91d5d8d4da77b260f5 /win | |
parent | 5a1dbbd9e19859d8de91c1e99ecb6577929deed2 (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')
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 12 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 18 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 1 |
3 files changed, 28 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)
{
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index a25aa5633..62e0bc698 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -956,6 +956,7 @@ namespace Handbrake Subtitles.drp_subtitleTracks.Items.Add("Foreign Audio Search (Bitmap)");
Subtitles.drp_subtitleTracks.Items.AddRange(selectedTitle.Subtitles.ToArray());
Subtitles.drp_subtitleTracks.SelectedIndex = 0;
+ Subtitles.setSubtitleTrackAuto();
}
// Run the autoName & chapterNaming functions
|