From 35a04667a062373693c91da1e3508beb40e51893 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 27 Mar 2013 19:56:23 +0000 Subject: WinGui: Couple bug fixes and tweaks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5366 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/QueueProcessor.cs | 2 +- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 172fe7291..a442dc5ce 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -215,7 +215,7 @@ namespace HandBrake.ApplicationServices.Services /// public bool CheckForDestinationPathDuplicates(string destination) { - return this.queue.Any(checkItem => checkItem.Task.Destination.Contains(destination.Replace("\\\\", "\\"))); + return this.queue.Any(job => job.Task != null && job.Task.Destination.Contains(destination.Replace("\\\\", "\\"))); } /// diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 8f643a74b..32a92c94f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1076,6 +1076,11 @@ namespace HandBrakeWPF.ViewModels return; } + if (this.CurrentTask != null && this.CurrentTask.SubtitleTracks != null && this.CurrentTask.SubtitleTracks.Count > 0) + { + this.errorService.ShowMessageBox("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.", "Warning", MessageBoxButton.OK, MessageBoxImage.Error); + } + foreach (Title title in this.ScannedSource.Titles) { this.SelectedTitle = title; @@ -1500,7 +1505,15 @@ namespace HandBrakeWPF.ViewModels /// public void PresetExport() { - VistaSaveFileDialog savefiledialog = new VistaSaveFileDialog { Filter = "plist|*.plist", CheckPathExists = true, AddExtension = true }; + VistaSaveFileDialog savefiledialog = new VistaSaveFileDialog + { + Filter = "plist|*.plist", + CheckPathExists = true, + AddExtension = true, + DefaultExt = ".plist", + OverwritePrompt = true, + FilterIndex = 0 + }; if (this.selectedPreset != null) { savefiledialog.ShowDialog(); @@ -1508,7 +1521,11 @@ namespace HandBrakeWPF.ViewModels if (filename != null) { - PlistUtility.Export(savefiledialog.FileName, this.selectedPreset, userSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeBuild).ToString(CultureInfo.InvariantCulture)); + PlistUtility.Export( + savefiledialog.FileName, + this.selectedPreset, + userSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeBuild) + .ToString(CultureInfo.InvariantCulture)); } } else -- cgit v1.2.3