summaryrefslogtreecommitdiffstats
path: root/win/CS/frmOptions.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-12-01 22:11:32 +0000
committersr55 <[email protected]>2011-12-01 22:11:32 +0000
commitf12fe4521c0555e907caecf118b7539e03ea1b38 (patch)
tree18af236300ad406061ceb165fdc8197c764b799c /win/CS/frmOptions.cs
parent608d03fdab381791aef98ddb53eea09e8f42bb57 (diff)
WinGui: Extended the Automatic Audioo/Subtitle selection feature to allow a preferred language to be set for Subtitles and remove some restrictions on the window to make it more flexible.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4370 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmOptions.cs')
-rw-r--r--win/CS/frmOptions.cs30
1 files changed, 11 insertions, 19 deletions
diff --git a/win/CS/frmOptions.cs b/win/CS/frmOptions.cs
index 972ded0ee..7e6c60683 100644
--- a/win/CS/frmOptions.cs
+++ b/win/CS/frmOptions.cs
@@ -45,7 +45,8 @@ namespace Handbrake
foreach (string item in langList.Keys)
{
- drop_preferredLang.Items.Add(item);
+ drop_preferredLangAudio.Items.Add(item);
+ drop_preferredLangSubtitles.Items.Add(item);
// In the available languages should be no "Any" and no selected language.
if ((item != "Any") && (!this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages).Contains(item)))
@@ -133,7 +134,8 @@ namespace Handbrake
// Audio and Subtitles Tab
// #############################
- drop_preferredLang.SelectedItem = this.userSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage);
+ drop_preferredLangAudio.SelectedItem = this.userSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage);
+ drop_preferredLangSubtitles.SelectedItem = this.userSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguageForSubtitles);
//if (this.userSettingService.GetUserSetting<int>(UserSettingConstants.DubMode) != 255)
//{
@@ -398,24 +400,12 @@ namespace Handbrake
private void drop_preferredLang_SelectedIndexChanged(object sender, EventArgs e)
{
- this.userSettingService.SetUserSetting(UserSettingConstants.NativeLanguage, drop_preferredLang.SelectedItem.ToString());
-
- if (this.userSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage) == "Any")
- {
- cb_audioMode.Enabled = false;
- cb_subtitleMode.Enabled = false;
- check_AddOnlyOneAudioPerLanguage.Enabled = false;
-
- audioSelectionPanel.Enabled = false;
- }
- else
- {
- cb_audioMode.Enabled = true;
- cb_subtitleMode.Enabled = true;
- check_AddOnlyOneAudioPerLanguage.Enabled = true;
+ this.userSettingService.SetUserSetting(UserSettingConstants.NativeLanguage, drop_preferredLangAudio.SelectedItem.ToString());
+ }
- audioSelectionPanel.Enabled = true;
- }
+ private void drop_preferredLangSubtitles_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.userSettingService.SetUserSetting(UserSettingConstants.NativeLanguageForSubtitles, drop_preferredLangSubtitles.SelectedItem.ToString());
}
private void button_removeLanguage_Click(object sender, EventArgs e)
@@ -733,5 +723,7 @@ namespace Handbrake
{
this.Close();
}
+
+
}
} \ No newline at end of file