]> granicus.if.org Git - handbrake/commitdiff
WinGui: Downgrade Subtitle Behaviour Error to a warning. Also checks the behaviour...
authorsr55 <sr55.hb@outlook.com>
Thu, 29 Dec 2016 14:35:31 +0000 (14:35 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 29 Dec 2016 14:36:14 +0000 (14:36 +0000)
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 54a401bf49392792c24c0c62b37cc370cc1c3a58..c158e447237ba844d3a5494893375b8404302d18 100644 (file)
@@ -667,7 +667,9 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to Warning: It is not currently possible to use this feature if you require specific subtitle or audio tracks that the automatic selection feature (see options) doesn&apos;t support! Tracks are reset with every new source / title selected..\r
+        ///   Looks up a localized string similar to Warning: If you wish to have subtitles added to each item you are about to queue, please verify that you have the subtitle defaults setup correctly on the subtitles tab.\r
+        ///    \r
+        ///    Do you wish to continue?.\r
         /// </summary>\r
         public static string Main_AutoAdd_AudioAndSubWarning {\r
             get {\r
index 161b55a8f8a793ba92f83c3ba2e4699df1beb362..cf745c370366e407d267dc158edf9400edc34454 100644 (file)
@@ -328,7 +328,9 @@ In order to use the QuickSync encoder, you must:
     <value>Error</value>\r
   </data>\r
   <data name="Main_AutoAdd_AudioAndSubWarning" xml:space="preserve">\r
-    <value>Warning: It is not currently possible to use this feature if you require specific subtitle or audio tracks that the automatic selection feature (see options) doesn't support! Tracks are reset with every new source / title selected.</value>\r
+    <value>Warning: If you wish to have subtitles added to each item you are about to queue, please verify that you have the subtitle defaults setup correctly on the subtitles tab.\r
+    \r
+    Do you wish to continue?</value>\r
   </data>\r
   <data name="Main_TurnOnAutoFileNaming" xml:space="preserve">\r
     <value>You must turn on automatic file naming AND set a default path in preferences before you can add to the queue.</value>\r
index 2fa5425a54f59e4fe58dd90c0dd00b6b14a81cbf..36e65d2e524113a7ef2d33e5133c8d86cf6cf9ea 100644 (file)
@@ -18,6 +18,7 @@ namespace HandBrakeWPF.ViewModels
     using System.Linq;\r
     using System.Threading;\r
     using System.Windows;\r
+    using System.Windows.Forms;\r
     using System.Windows.Input;\r
 \r
     using Caliburn.Micro;\r
@@ -50,13 +51,17 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.ViewModels.Interfaces;\r
     using HandBrakeWPF.Views;\r
 \r
-    using Microsoft.Win32;\r
-\r
     using Ookii.Dialogs.Wpf;\r
 \r
     using Action = System.Action;\r
+    using Application = System.Windows.Application;\r
+    using DataFormats = System.Windows.DataFormats;\r
+    using DragEventArgs = System.Windows.DragEventArgs;\r
     using Execute = Caliburn.Micro.Execute;\r
     using LogManager = HandBrakeWPF.Helpers.LogManager;\r
+    using MessageBox = System.Windows.MessageBox;\r
+    using OpenFileDialog = Microsoft.Win32.OpenFileDialog;\r
+    using SaveFileDialog = Microsoft.Win32.SaveFileDialog;\r
 \r
     /// <summary>\r
     /// HandBrakes Main Window\r
@@ -1472,7 +1477,19 @@ namespace HandBrakeWPF.ViewModels
 \r
             if (this.CurrentTask != null && this.CurrentTask.SubtitleTracks != null && this.CurrentTask.SubtitleTracks.Count > 0)\r
             {\r
-                this.errorService.ShowMessageBox(Resources.Main_AutoAdd_AudioAndSubWarning, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Error);\r
+                if (this.SubtitleViewModel.SubtitleBehaviours == null || this.SubtitleViewModel.SubtitleBehaviours.SelectedBehaviour == SubtitleBehaviourModes.None)\r
+                {\r
+                    System.Windows.MessageBoxResult result = this.errorService.ShowMessageBox(\r
+                        Resources.Main_AutoAdd_AudioAndSubWarning,\r
+                        Resources.Warning,\r
+                        MessageBoxButton.YesNo,\r
+                        MessageBoxImage.Warning);\r
+\r
+                    if (result == MessageBoxResult.No)\r
+                    {\r
+                        return;\r
+                    }\r
+                }\r
             }\r
 \r
             foreach (Title title in this.ScannedSource.Titles)\r