]> granicus.if.org Git - handbrake/commitdiff
WinGui: Extended the Automatic Audioo/Subtitle selection feature to allow a preferred...
authorsr55 <sr55.hb@outlook.com>
Thu, 1 Dec 2011 22:11:32 +0000 (22:11 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 1 Dec 2011 22:11:32 +0000 (22:11 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4370 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Controls/AudioPanel.cs
win/CS/Controls/Subtitles.cs
win/CS/UserSettingConstants.cs
win/CS/defaultsettings.xml
win/CS/frmOptions.Designer.cs
win/CS/frmOptions.cs
win/CS/frmOptions.resx

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