diff options
author | sr55 <[email protected]> | 2011-12-01 22:11:32 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-01 22:11:32 +0000 |
commit | f12fe4521c0555e907caecf118b7539e03ea1b38 (patch) | |
tree | 18af236300ad406061ceb165fdc8197c764b799c /win | |
parent | 608d03fdab381791aef98ddb53eea09e8f42bb57 (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')
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 13 | ||||
-rw-r--r-- | win/CS/Controls/Subtitles.cs | 19 | ||||
-rw-r--r-- | win/CS/UserSettingConstants.cs | 1 | ||||
-rw-r--r-- | win/CS/defaultsettings.xml | 8 | ||||
-rw-r--r-- | win/CS/frmOptions.Designer.cs | 108 | ||||
-rw-r--r-- | win/CS/frmOptions.cs | 30 | ||||
-rw-r--r-- | win/CS/frmOptions.resx | 3 |
7 files changed, 104 insertions, 78 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index fc9083586..f50340f80 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -609,7 +609,6 @@ namespace Handbrake.Controls }
}
-
/// <summary>
/// Attempt to automatically select the correct audio tracks based on the users settings.
/// </summary>
@@ -621,10 +620,10 @@ namespace Handbrake.Controls this.AudioTracks.Clear();
return;
}
-
- // Handle Preferred Language
+
if (this.UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage) == "Any")
{
+ // If we have Any as the preferred Language, just set the first track to all audio tracks.
drp_audioTrack.SelectedIndex = 0;
foreach (AudioTrack track in this.audioTracks)
{
@@ -634,10 +633,10 @@ namespace Handbrake.Controls }
}
- return;
}
else
- {
+ {
+ // Otherwise, set all the tracks to the first track of the preferred language.
foreach (Audio item in drp_audioTrack.Items)
{
if (item.Language.Contains(this.UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage)))
@@ -663,7 +662,7 @@ namespace Handbrake.Controls // Now add any additional Langauges tracks on top of the presets tracks.
int mode = this.UserSettingService.GetUserSetting<int>(UserSettingConstants.DubModeAudio);
ArrayList languageOrder = new ArrayList(); // This is used to keep the Prefered Language in the front and the other languages in order. TODO this is no longer required, refactor this.
- if (mode > 0)
+ if (mode > 1)
{
foreach (string item in this.UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))
{
@@ -706,7 +705,7 @@ namespace Handbrake.Controls {
case 1: // Adding all remaining audio tracks
this.mnu_AddAll_Click(this, EventArgs.Empty);
- break;
+ break;
case 2: // Add Langauges tracks for the additional languages selected, in-order.
audioList.ClearSelection();
foreach (string item in languageOrder)
diff --git a/win/CS/Controls/Subtitles.cs b/win/CS/Controls/Subtitles.cs index 4a5bc5fd5..1775f3b6e 100644 --- a/win/CS/Controls/Subtitles.cs +++ b/win/CS/Controls/Subtitles.cs @@ -229,14 +229,11 @@ namespace Handbrake.Controls // New DUB Settings
int mode = UserSettingService.GetUserSetting<int>(UserSettingConstants.DubModeSubtitle);
- if (UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage) == "Any")
- mode = 0;
-
// Native Language is not 'Any', so initialising the Language Dictionary
if (mode >= 3)
{
- languageIndex.Add(UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage), new ArrayList());
- languageOrder.Add(UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguage));
+ languageIndex.Add(UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguageForSubtitles), new ArrayList());
+ languageOrder.Add(UserSettingService.GetUserSetting<string>(UserSettingConstants.NativeLanguageForSubtitles));
foreach (string item in UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))
{
@@ -282,7 +279,7 @@ namespace Handbrake.Controls if (drp_subtitleTracks.SelectedItem != null)
this.btn_addSubtitleTrack_Click(this, new EventArgs());
break;
- case 3:
+ case 3: // Selected Languages Only
foreach (string item in languageOrder)
{
if (languageIndex[item].Count > 0)
@@ -293,13 +290,13 @@ namespace Handbrake.Controls if (drp_subtitleTracks.SelectedItem != null)
{
this.btn_addSubtitleTrack_Click(this, new EventArgs());
- //subList.ClearSelection();
}
}
}
}
break;
- case 4:
+ case 4: // Prefered Only
+ case 5: // Prefered Only All
if (languageIndex[(string)languageOrder[0]].Count > 0)
{
foreach (int i in languageIndex[(string)languageOrder[0]])
@@ -308,7 +305,11 @@ namespace Handbrake.Controls if (drp_subtitleTracks.SelectedItem != null)
{
this.btn_addSubtitleTrack_Click(this, new EventArgs());
- //subList.ClearSelection();
+ if (mode == 4)
+ {
+ // Mode 4 is First, 5 is All
+ break;
+ }
}
}
}
diff --git a/win/CS/UserSettingConstants.cs b/win/CS/UserSettingConstants.cs index d4fdf12a0..a8a057f0d 100644 --- a/win/CS/UserSettingConstants.cs +++ b/win/CS/UserSettingConstants.cs @@ -28,6 +28,7 @@ namespace Handbrake public const string UseM4v = "useM4v";
public const string PromptOnUnmatchingQueries = "PromptOnUnmatchingQueries";
public const string NativeLanguage = "NativeLanguage";
+ public const string NativeLanguageForSubtitles = "NativeLanguageSubtitles";
public const string DubMode = "DubMode";
public const string CliExeHash = "CliExeHash";
public const string ClearOldLogs = "clearOldLogs";
diff --git a/win/CS/defaultsettings.xml b/win/CS/defaultsettings.xml index 6fea12dc4..bff3307a4 100644 --- a/win/CS/defaultsettings.xml +++ b/win/CS/defaultsettings.xml @@ -274,6 +274,14 @@ </item>
<item>
<key>
+ <string>NativeLanguageForSubtitles</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ </value>
+ </item>
+ <item>
+ <key>
<string>DubMode</string>
</key>
<value>
diff --git a/win/CS/frmOptions.Designer.cs b/win/CS/frmOptions.Designer.cs index 1feabd3f8..1fa8af07f 100644 --- a/win/CS/frmOptions.Designer.cs +++ b/win/CS/frmOptions.Designer.cs @@ -71,6 +71,8 @@ namespace Handbrake this.txt_vlcPath = new System.Windows.Forms.TextBox();
this.label36 = new System.Windows.Forms.Label();
this.tab_audio_sub = new System.Windows.Forms.TabPage();
+ this.label48 = new System.Windows.Forms.Label();
+ this.drop_preferredLangSubtitles = new System.Windows.Forms.ComboBox();
this.label39 = new System.Windows.Forms.Label();
this.audioSelectionPanel = new System.Windows.Forms.Panel();
this.label46 = new System.Windows.Forms.Label();
@@ -94,7 +96,7 @@ namespace Handbrake this.label43 = new System.Windows.Forms.Label();
this.label31 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
- this.drop_preferredLang = new System.Windows.Forms.ComboBox();
+ this.drop_preferredLangAudio = new System.Windows.Forms.ComboBox();
this.tab_cli = new System.Windows.Forms.TabPage();
this.label11 = new System.Windows.Forms.Label();
this.check_preventSleep = new System.Windows.Forms.CheckBox();
@@ -186,7 +188,7 @@ namespace Handbrake this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(527, 462);
+ this.btn_close.Location = new System.Drawing.Point(527, 456);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(72, 22);
this.btn_close.TabIndex = 53;
@@ -224,7 +226,7 @@ namespace Handbrake this.tab_options.Location = new System.Drawing.Point(12, 74);
this.tab_options.Name = "tab_options";
this.tab_options.SelectedIndex = 0;
- this.tab_options.Size = new System.Drawing.Size(588, 383);
+ this.tab_options.Size = new System.Drawing.Size(588, 375);
this.tab_options.TabIndex = 58;
//
// tab_general
@@ -245,7 +247,7 @@ namespace Handbrake this.tab_general.Location = new System.Drawing.Point(4, 22);
this.tab_general.Name = "tab_general";
this.tab_general.Padding = new System.Windows.Forms.Padding(10);
- this.tab_general.Size = new System.Drawing.Size(580, 357);
+ this.tab_general.Size = new System.Drawing.Size(580, 349);
this.tab_general.TabIndex = 3;
this.tab_general.Text = "General";
this.tab_general.UseVisualStyleBackColor = true;
@@ -415,7 +417,7 @@ namespace Handbrake this.tab_outputFiles.Location = new System.Drawing.Point(4, 22);
this.tab_outputFiles.Name = "tab_outputFiles";
this.tab_outputFiles.Padding = new System.Windows.Forms.Padding(3);
- this.tab_outputFiles.Size = new System.Drawing.Size(580, 357);
+ this.tab_outputFiles.Size = new System.Drawing.Size(580, 349);
this.tab_outputFiles.TabIndex = 7;
this.tab_outputFiles.Text = "Output Files";
this.tab_outputFiles.UseVisualStyleBackColor = true;
@@ -446,7 +448,7 @@ namespace Handbrake this.check_autoNaming.AutoSize = true;
this.check_autoNaming.Location = new System.Drawing.Point(111, 13);
this.check_autoNaming.Name = "check_autoNaming";
- this.check_autoNaming.Size = new System.Drawing.Size(171, 17);
+ this.check_autoNaming.Size = new System.Drawing.Size(176, 17);
this.check_autoNaming.TabIndex = 72;
this.check_autoNaming.Text = "Automatically name output files";
this.ToolTip.SetToolTip(this.check_autoNaming, "Automatically name output files");
@@ -573,7 +575,7 @@ namespace Handbrake this.tab_picture.Location = new System.Drawing.Point(4, 22);
this.tab_picture.Name = "tab_picture";
this.tab_picture.Padding = new System.Windows.Forms.Padding(10);
- this.tab_picture.Size = new System.Drawing.Size(580, 357);
+ this.tab_picture.Size = new System.Drawing.Size(580, 349);
this.tab_picture.TabIndex = 5;
this.tab_picture.Text = "Preview";
this.tab_picture.UseVisualStyleBackColor = true;
@@ -626,25 +628,48 @@ namespace Handbrake //
// tab_audio_sub
//
+ this.tab_audio_sub.Controls.Add(this.label48);
+ this.tab_audio_sub.Controls.Add(this.drop_preferredLangSubtitles);
this.tab_audio_sub.Controls.Add(this.label39);
this.tab_audio_sub.Controls.Add(this.audioSelectionPanel);
this.tab_audio_sub.Controls.Add(this.label45);
this.tab_audio_sub.Controls.Add(this.groupBox2);
this.tab_audio_sub.Controls.Add(this.label31);
this.tab_audio_sub.Controls.Add(this.label15);
- this.tab_audio_sub.Controls.Add(this.drop_preferredLang);
+ this.tab_audio_sub.Controls.Add(this.drop_preferredLangAudio);
this.tab_audio_sub.Location = new System.Drawing.Point(4, 22);
this.tab_audio_sub.Name = "tab_audio_sub";
this.tab_audio_sub.Padding = new System.Windows.Forms.Padding(3);
- this.tab_audio_sub.Size = new System.Drawing.Size(580, 357);
+ this.tab_audio_sub.Size = new System.Drawing.Size(580, 349);
this.tab_audio_sub.TabIndex = 6;
this.tab_audio_sub.Text = "Audio and Subtitles";
this.tab_audio_sub.UseVisualStyleBackColor = true;
//
+ // label48
+ //
+ this.label48.AutoSize = true;
+ this.label48.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label48.Location = new System.Drawing.Point(127, 37);
+ this.label48.Name = "label48";
+ this.label48.Size = new System.Drawing.Size(32, 11);
+ this.label48.TabIndex = 111;
+ this.label48.Text = "Audio:";
+ //
+ // drop_preferredLangSubtitles
+ //
+ this.drop_preferredLangSubtitles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_preferredLangSubtitles.FormattingEnabled = true;
+ this.drop_preferredLangSubtitles.Location = new System.Drawing.Point(349, 32);
+ this.drop_preferredLangSubtitles.Name = "drop_preferredLangSubtitles";
+ this.drop_preferredLangSubtitles.Size = new System.Drawing.Size(118, 21);
+ this.drop_preferredLangSubtitles.TabIndex = 110;
+ this.ToolTip.SetToolTip(this.drop_preferredLangSubtitles, "The primary selected language. If set to \"Any\" no advance options are available.");
+ this.drop_preferredLangSubtitles.SelectedIndexChanged += new System.EventHandler(this.drop_preferredLangSubtitles_SelectedIndexChanged);
+ //
// label39
//
this.label39.AutoSize = true;
- this.label39.Location = new System.Drawing.Point(6, 68);
+ this.label39.Location = new System.Drawing.Point(6, 63);
this.label39.Name = "label39";
this.label39.Size = new System.Drawing.Size(92, 13);
this.label39.TabIndex = 109;
@@ -661,7 +686,7 @@ namespace Handbrake this.audioSelectionPanel.Controls.Add(this.label47);
this.audioSelectionPanel.Controls.Add(this.button_removeLanguage);
this.audioSelectionPanel.Controls.Add(this.button_clearLanguage);
- this.audioSelectionPanel.Location = new System.Drawing.Point(125, 68);
+ this.audioSelectionPanel.Location = new System.Drawing.Point(125, 63);
this.audioSelectionPanel.Name = "audioSelectionPanel";
this.audioSelectionPanel.Size = new System.Drawing.Size(381, 166);
this.audioSelectionPanel.TabIndex = 108;
@@ -762,11 +787,11 @@ namespace Handbrake //
this.label45.AutoSize = true;
this.label45.Font = new System.Drawing.Font("Tahoma", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label45.Location = new System.Drawing.Point(249, 37);
+ this.label45.Location = new System.Drawing.Point(300, 37);
this.label45.Name = "label45";
- this.label45.Size = new System.Drawing.Size(107, 11);
+ this.label45.Size = new System.Drawing.Size(43, 11);
this.label45.TabIndex = 107;
- this.label45.Text = "Primary Audio Language";
+ this.label45.Text = "Subtitles:";
//
// groupBox2
//
@@ -778,7 +803,7 @@ namespace Handbrake this.groupBox2.Controls.Add(this.check_AddOnlyOneAudioPerLanguage);
this.groupBox2.Controls.Add(this.check_AddCCTracks);
this.groupBox2.Controls.Add(this.label43);
- this.groupBox2.Location = new System.Drawing.Point(19, 243);
+ this.groupBox2.Location = new System.Drawing.Point(19, 232);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(537, 106);
this.groupBox2.TabIndex = 106;
@@ -811,8 +836,9 @@ namespace Handbrake "None",
"All",
"First",
- "Selected",
- "Prefered Only"});
+ "Selected Languages Only",
+ "Prefered Only (First)",
+ "Prefered Only (All)"});
this.cb_subtitleMode.Location = new System.Drawing.Point(79, 52);
this.cb_subtitleMode.Name = "cb_subtitleMode";
this.cb_subtitleMode.Size = new System.Drawing.Size(147, 21);
@@ -904,16 +930,16 @@ namespace Handbrake this.label15.TabIndex = 88;
this.label15.Text = "Preferred Language:";
//
- // drop_preferredLang
+ // drop_preferredLangAudio
//
- this.drop_preferredLang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_preferredLang.FormattingEnabled = true;
- this.drop_preferredLang.Location = new System.Drawing.Point(125, 32);
- this.drop_preferredLang.Name = "drop_preferredLang";
- this.drop_preferredLang.Size = new System.Drawing.Size(118, 21);
- this.drop_preferredLang.TabIndex = 87;
- this.ToolTip.SetToolTip(this.drop_preferredLang, "The primary selected language. If set to \"Any\" no advance options are available.");
- this.drop_preferredLang.SelectedIndexChanged += new System.EventHandler(this.drop_preferredLang_SelectedIndexChanged);
+ this.drop_preferredLangAudio.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_preferredLangAudio.FormattingEnabled = true;
+ this.drop_preferredLangAudio.Location = new System.Drawing.Point(165, 32);
+ this.drop_preferredLangAudio.Name = "drop_preferredLangAudio";
+ this.drop_preferredLangAudio.Size = new System.Drawing.Size(118, 21);
+ this.drop_preferredLangAudio.TabIndex = 87;
+ this.ToolTip.SetToolTip(this.drop_preferredLangAudio, "The primary selected language. If set to \"Any\" no advance options are available.");
+ this.drop_preferredLangAudio.SelectedIndexChanged += new System.EventHandler(this.drop_preferredLang_SelectedIndexChanged);
//
// tab_cli
//
@@ -936,7 +962,7 @@ namespace Handbrake this.tab_cli.Location = new System.Drawing.Point(4, 22);
this.tab_cli.Name = "tab_cli";
this.tab_cli.Padding = new System.Windows.Forms.Padding(10);
- this.tab_cli.Size = new System.Drawing.Size(580, 357);
+ this.tab_cli.Size = new System.Drawing.Size(580, 349);
this.tab_cli.TabIndex = 2;
this.tab_cli.Text = "System and Logging";
this.tab_cli.UseVisualStyleBackColor = true;
@@ -959,7 +985,7 @@ namespace Handbrake this.check_preventSleep.AutoSize = true;
this.check_preventSleep.Location = new System.Drawing.Point(73, 45);
this.check_preventSleep.Name = "check_preventSleep";
- this.check_preventSleep.Size = new System.Drawing.Size(260, 17);
+ this.check_preventSleep.Size = new System.Drawing.Size(266, 17);
this.check_preventSleep.TabIndex = 91;
this.check_preventSleep.Text = "Prevent the system from sleeping when encoding.";
this.ToolTip.SetToolTip(this.check_preventSleep, "Prevent system from sleeping during encoding.");
@@ -972,7 +998,7 @@ namespace Handbrake this.check_clearOldLogs.AutoSize = true;
this.check_clearOldLogs.Location = new System.Drawing.Point(73, 234);
this.check_clearOldLogs.Name = "check_clearOldLogs";
- this.check_clearOldLogs.Size = new System.Drawing.Size(162, 17);
+ this.check_clearOldLogs.Size = new System.Drawing.Size(166, 17);
this.check_clearOldLogs.TabIndex = 90;
this.check_clearOldLogs.Text = "Clear logs older than 30 days";
this.ToolTip.SetToolTip(this.check_clearOldLogs, "Clear logs which are older than 30 days.\r\nThis only applies to HandBrakes Applica" +
@@ -1067,7 +1093,7 @@ namespace Handbrake this.check_logsInSpecifiedLocation.AutoSize = true;
this.check_logsInSpecifiedLocation.Location = new System.Drawing.Point(73, 139);
this.check_logsInSpecifiedLocation.Name = "check_logsInSpecifiedLocation";
- this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(305, 17);
+ this.check_logsInSpecifiedLocation.Size = new System.Drawing.Size(306, 17);
this.check_logsInSpecifiedLocation.TabIndex = 87;
this.check_logsInSpecifiedLocation.Text = "Put a copy of individual encode logs in a specified location:";
this.ToolTip.SetToolTip(this.check_logsInSpecifiedLocation, "Place a copy of the encode log in the same folder as the encoded movie.");
@@ -1169,7 +1195,7 @@ namespace Handbrake this.tab_advanced.Location = new System.Drawing.Point(4, 22);
this.tab_advanced.Name = "tab_advanced";
this.tab_advanced.Padding = new System.Windows.Forms.Padding(10);
- this.tab_advanced.Size = new System.Drawing.Size(580, 357);
+ this.tab_advanced.Size = new System.Drawing.Size(580, 349);
this.tab_advanced.TabIndex = 4;
this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
@@ -1204,7 +1230,7 @@ namespace Handbrake this.check_showCliForInGUIEncode.BackColor = System.Drawing.Color.Transparent;
this.check_showCliForInGUIEncode.Location = new System.Drawing.Point(81, 129);
this.check_showCliForInGUIEncode.Name = "check_showCliForInGUIEncode";
- this.check_showCliForInGUIEncode.Size = new System.Drawing.Size(324, 17);
+ this.check_showCliForInGUIEncode.Size = new System.Drawing.Size(330, 17);
this.check_showCliForInGUIEncode.TabIndex = 96;
this.check_showCliForInGUIEncode.Text = "Show CLI window (Allows you to cleanly exit encode with ctrl-c)";
this.ToolTip.SetToolTip(this.check_showCliForInGUIEncode, resources.GetString("check_showCliForInGUIEncode.ToolTip"));
@@ -1258,7 +1284,7 @@ namespace Handbrake this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent;
this.check_trayStatusAlerts.Location = new System.Drawing.Point(81, 37);
this.check_trayStatusAlerts.Name = "check_trayStatusAlerts";
- this.check_trayStatusAlerts.Size = new System.Drawing.Size(288, 17);
+ this.check_trayStatusAlerts.Size = new System.Drawing.Size(296, 17);
this.check_trayStatusAlerts.TabIndex = 93;
this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)";
this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +
@@ -1274,7 +1300,7 @@ namespace Handbrake this.check_mainMinimize.BackColor = System.Drawing.Color.Transparent;
this.check_mainMinimize.Location = new System.Drawing.Point(81, 14);
this.check_mainMinimize.Name = "check_mainMinimize";
- this.check_mainMinimize.Size = new System.Drawing.Size(221, 17);
+ this.check_mainMinimize.Size = new System.Drawing.Size(230, 17);
this.check_mainMinimize.TabIndex = 82;
this.check_mainMinimize.Text = "Minimize to system tray (Requires Restart)";
this.ToolTip.SetToolTip(this.check_mainMinimize, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +
@@ -1288,7 +1314,7 @@ namespace Handbrake this.check_promptOnUnmatchingQueries.AutoSize = true;
this.check_promptOnUnmatchingQueries.Location = new System.Drawing.Point(100, 83);
this.check_promptOnUnmatchingQueries.Name = "check_promptOnUnmatchingQueries";
- this.check_promptOnUnmatchingQueries.Size = new System.Drawing.Size(300, 17);
+ this.check_promptOnUnmatchingQueries.Size = new System.Drawing.Size(305, 17);
this.check_promptOnUnmatchingQueries.TabIndex = 63;
this.check_promptOnUnmatchingQueries.Text = "Prompt when a manual query does not match GUI settings";
this.check_promptOnUnmatchingQueries.UseVisualStyleBackColor = true;
@@ -1301,7 +1327,7 @@ namespace Handbrake this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;
this.check_dvdnav.Location = new System.Drawing.Point(82, 274);
this.check_dvdnav.Name = "check_dvdnav";
- this.check_dvdnav.Size = new System.Drawing.Size(277, 17);
+ this.check_dvdnav.Size = new System.Drawing.Size(276, 17);
this.check_dvdnav.TabIndex = 90;
this.check_dvdnav.Text = "Disable LibDVDNav. (libdvdread will be used instead)";
this.check_dvdnav.UseVisualStyleBackColor = false;
@@ -1314,7 +1340,7 @@ namespace Handbrake this.check_queryEditorTab.BackColor = System.Drawing.Color.Transparent;
this.check_queryEditorTab.Location = new System.Drawing.Point(81, 60);
this.check_queryEditorTab.Name = "check_queryEditorTab";
- this.check_queryEditorTab.Size = new System.Drawing.Size(236, 17);
+ this.check_queryEditorTab.Size = new System.Drawing.Size(241, 17);
this.check_queryEditorTab.TabIndex = 84;
this.check_queryEditorTab.Text = "Enable \"Query Editor\" tab (Requires Restart)";
this.ToolTip.SetToolTip(this.check_queryEditorTab, "Enables the Query Editor tab on the main window. Requires program restart to take" +
@@ -1366,7 +1392,7 @@ namespace Handbrake this.check_disablePresetNotification.BackColor = System.Drawing.Color.Transparent;
this.check_disablePresetNotification.Location = new System.Drawing.Point(81, 106);
this.check_disablePresetNotification.Name = "check_disablePresetNotification";
- this.check_disablePresetNotification.Size = new System.Drawing.Size(216, 17);
+ this.check_disablePresetNotification.Size = new System.Drawing.Size(222, 17);
this.check_disablePresetNotification.TabIndex = 91;
this.check_disablePresetNotification.Text = "Disable built-in preset update notification";
this.ToolTip.SetToolTip(this.check_disablePresetNotification, "Disables the notification you recieve when presets are updated when a new version" +
@@ -1786,7 +1812,7 @@ namespace Handbrake this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.ClientSize = new System.Drawing.Size(614, 494);
+ this.ClientSize = new System.Drawing.Size(614, 488);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.tab_options);
@@ -1907,7 +1933,7 @@ namespace Handbrake internal System.Windows.Forms.ComboBox drp_Priority;
private System.Windows.Forms.CheckBox check_promptOnUnmatchingQueries;
private System.Windows.Forms.TabPage tab_audio_sub;
- internal System.Windows.Forms.ComboBox drop_preferredLang;
+ internal System.Windows.Forms.ComboBox drop_preferredLangAudio;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Label label15;
internal System.Windows.Forms.Button btn_browse;
@@ -1957,5 +1983,7 @@ namespace Handbrake private System.Windows.Forms.Label label39;
private System.Windows.Forms.NumericUpDown ud_minTitleLength;
private System.Windows.Forms.Label label40;
+ private System.Windows.Forms.Label label48;
+ internal System.Windows.Forms.ComboBox drop_preferredLangSubtitles;
}
}
\ No newline at end of file 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 diff --git a/win/CS/frmOptions.resx b/win/CS/frmOptions.resx index fd66b7b5e..104647c5f 100644 --- a/win/CS/frmOptions.resx +++ b/win/CS/frmOptions.resx @@ -120,9 +120,6 @@ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 18</value>
</metadata>
- <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>132, 18</value>
- </metadata>
<data name="cb_mp4FileMode.ToolTip" xml:space="preserve">
<value>The default file extension for MP4 Files.
Automatic - This will use M4v when AC3 Audio, SRT Subtitles or Chapters are present, otherwise MP4.
|