From 5e65c94c9f4785d05789e7b11056e9063d0d852f Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 20 May 2012 15:39:03 +0000 Subject: WinGui: Range of bug fixes and UI tweaks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4691 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Converters/Video/VideoEncoderConverter.cs | 7 +++++- .../ViewModels/PictureSettingsViewModel.cs | 4 ++-- win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 4 +--- win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 2 +- win/CS/HandBrakeWPF/Views/VideoView.xaml | 2 +- win/CS/HandBrakeWPF/Views/VideoView.xaml.cs | 26 +++++++++++----------- 6 files changed, 24 insertions(+), 21 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index a6f29357f..0403fa881 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -58,7 +58,12 @@ namespace HandBrakeWPF.Converters.Video return EnumHelper.GetEnumDisplayValuesSubset(encoders); } - return EnumHelper.GetDisplay((VideoEncoder)values[0]); + if (values[0].GetType() == typeof(VideoEncoder)) + { + return EnumHelper.GetDisplay((VideoEncoder)values[0]); + } + + return null; } /// diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index e3fddb827..cbed5a1bc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -494,7 +494,7 @@ namespace HandBrakeWPF.ViewModels this.Height = preset.Task.Height ?? (sourceResolution.Height - this.CropTop - this.CropBottom); } - if (this.Task.Anamorphic == Anamorphic.Custom) + if (preset.Task.Anamorphic == Anamorphic.Custom) { this.DisplayWidth = preset.Task.DisplayWidth != null ? int.Parse(preset.Task.DisplayWidth.ToString()) : 0; this.ParWidth = preset.Task.PixelAspectX; @@ -503,7 +503,7 @@ namespace HandBrakeWPF.ViewModels this.MaintainAspectRatio = preset.Task.KeepDisplayAspect; - if (this.Task.Modulus.HasValue) + if (preset.Task.Modulus.HasValue) { this.SelectedModulus = preset.Task.Modulus; } diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index b5344788d..e6e6c8c01 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -69,11 +69,9 @@ namespace HandBrakeWPF.ViewModels /// The window manager. /// /// - /// /// The Queue Processor Service /// /// - /// /// The Error Service /// public QueueViewModel(IWindowManager windowManager, IQueueProcessor queueProcessor, IErrorService errorService) @@ -331,7 +329,7 @@ namespace HandBrakeWPF.ViewModels /// private void QueueManager_QueueChanged(object sender, EventArgs e) { - // TODO + this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.QueueManager.Count); } /// diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 99097a0b0..ae87c95b1 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -27,7 +27,7 @@