summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-12-29 14:35:31 +0000
committersr55 <[email protected]>2016-12-29 14:35:46 +0000
commit7686d1fed5998c58f26782cfce9be3360c9284bc (patch)
tree9ae2deecac32953890c627d1d1ce3aeb5e11e0df /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parentda04cfa6dd8f60198edede3599259ba31a08be9c (diff)
WinGui: Downgrade Subtitle Behaviour Error to a warning. Also checks the behaviour mode now so it should not appear as often. Also change it to Yes/No confirmation.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs23
1 files changed, 20 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 2fa5425a5..36e65d2e5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -18,6 +18,7 @@ namespace HandBrakeWPF.ViewModels
using System.Linq;
using System.Threading;
using System.Windows;
+ using System.Windows.Forms;
using System.Windows.Input;
using Caliburn.Micro;
@@ -50,13 +51,17 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.ViewModels.Interfaces;
using HandBrakeWPF.Views;
- using Microsoft.Win32;
-
using Ookii.Dialogs.Wpf;
using Action = System.Action;
+ using Application = System.Windows.Application;
+ using DataFormats = System.Windows.DataFormats;
+ using DragEventArgs = System.Windows.DragEventArgs;
using Execute = Caliburn.Micro.Execute;
using LogManager = HandBrakeWPF.Helpers.LogManager;
+ using MessageBox = System.Windows.MessageBox;
+ using OpenFileDialog = Microsoft.Win32.OpenFileDialog;
+ using SaveFileDialog = Microsoft.Win32.SaveFileDialog;
/// <summary>
/// HandBrakes Main Window
@@ -1472,7 +1477,19 @@ namespace HandBrakeWPF.ViewModels
if (this.CurrentTask != null && this.CurrentTask.SubtitleTracks != null && this.CurrentTask.SubtitleTracks.Count > 0)
{
- this.errorService.ShowMessageBox(Resources.Main_AutoAdd_AudioAndSubWarning, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Error);
+ if (this.SubtitleViewModel.SubtitleBehaviours == null || this.SubtitleViewModel.SubtitleBehaviours.SelectedBehaviour == SubtitleBehaviourModes.None)
+ {
+ System.Windows.MessageBoxResult result = this.errorService.ShowMessageBox(
+ Resources.Main_AutoAdd_AudioAndSubWarning,
+ Resources.Warning,
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Warning);
+
+ if (result == MessageBoxResult.No)
+ {
+ return;
+ }
+ }
}
foreach (Title title in this.ScannedSource.Titles)