From a9cad63afe88581bf0ea5463e3199bd0d1b474c0 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 29 Dec 2013 20:23:51 +0000 Subject: WinGui: Fix a few bugs: - Advanced query getting nulled out for QSV due to some dead code. - Updated the regex for the decomb value to accept unquoted value as well as quoted. - Remapped Ctrl-F to Ctrl-O to be more standard. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5944 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Views/ShellView.xaml.cs | 1 + win/CS/HandBrakeWPF/Views/VideoView.xaml | 6 +-- win/CS/HandBrakeWPF/Views/VideoView.xaml.cs | 72 ----------------------------- 3 files changed, 4 insertions(+), 75 deletions(-) (limited to 'win/CS/HandBrakeWPF/Views') diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs index fbf700b4a..35e1e0333 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs @@ -77,6 +77,7 @@ namespace HandBrakeWPF.Views this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control))); this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control))); this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F, ModifierKeys.Control)), new KeyGesture(Key.F, ModifierKeys.Control))); + this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control))); this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.R, ModifierKeys.Control)), new KeyGesture(Key.R, ModifierKeys.Control))); this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.D, ModifierKeys.Control | ModifierKeys.Shift))); diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index fffbfd0b2..1f0b31764 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -96,7 +96,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -192,7 +192,7 @@ + IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" /> diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs index 9f12972be..8a0842a96 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs @@ -9,14 +9,8 @@ namespace HandBrakeWPF.Views { - using System.Collections.Generic; - using System.Windows; using System.Windows.Controls; - using HandBrake.ApplicationServices.Model; - - using HandBrakeWPF.ViewModels; - /// /// Interaction logic for VideoView.xaml /// @@ -29,71 +23,5 @@ namespace HandBrakeWPF.Views { InitializeComponent(); } - - /// - /// The qsv_preset_radiobutton. - /// - /// - /// The sender. - /// - /// - /// The e. - /// - private void qsv_preset_radiobutton(object sender, System.Windows.RoutedEventArgs e) - { - qsv_preset_ValueChanged(sender, null); - } - - /// - /// The qsv_preset_ value changed. - /// - /// - /// The sender. - /// - /// - /// The e. - /// - private void qsv_preset_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - VideoViewModel mvm = ((VideoViewModel)this.DataContext); - EncodeTask task = mvm.Task; - - string full_string = string.Empty; - - IDictionary newOptions = new Dictionary(); - string[] existingSegments = full_string.Split(':'); - foreach (string existingSegment in existingSegments) - { - string optionName = existingSegment; - string optionValue = string.Empty; - int equalsIndex = existingSegment.IndexOf('='); - if (equalsIndex >= 0) - { - optionName = existingSegment.Substring( - 0, existingSegment.IndexOf("=", System.StringComparison.Ordinal)); - optionValue = existingSegment.Substring(equalsIndex); - } - - if (optionName != string.Empty) - { - if (newOptions.ContainsKey(optionName)) - newOptions.Remove(optionName); - newOptions.Add(optionName, optionValue); - } - } - - full_string = string.Empty; - foreach (KeyValuePair entry in newOptions) - { - full_string += entry.Key; - if (entry.Value != string.Empty) - full_string += entry.Value; - full_string += ":"; - } - full_string = full_string.TrimEnd(':'); - - task.AdvancedEncoderOptions = full_string; - task.NotifyOfPropertyChange(() => task.AdvancedEncoderOptions); - } } } -- cgit v1.2.3