From: sr55 Date: Sun, 4 Nov 2018 20:59:02 +0000 (+0000) Subject: WinGui: Add shortcuts for All All to Queue and Add Selection. Display shortcuts... X-Git-Tag: 1.2.0~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46598fde8cec433cd93798f46045a628734eca13;p=handbrake WinGui: Add shortcuts for All All to Queue and Add Selection. Display shortcuts on the Context Menu on the Add to Queue button. --- diff --git a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs index 064b6fe51..dfa0830a4 100644 --- a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs @@ -78,6 +78,18 @@ namespace HandBrakeWPF.Commands mainViewModel.AddToQueue(); } + // Add all to Queue (Alt+A) + if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.A) + { + mainViewModel.AddAllToQueue(); + } + + // Add selection to Queue (Control+Shift+A) + if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && gesture.Key == Key.A) + { + mainViewModel.AddSelectionToQueue(); + } + // Scan a File (Alt+O) if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.O) { diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs index b4156752e..3f0c6ae2e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs @@ -50,6 +50,8 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// True if added, false if error /// bool AddToQueue(); + void AddAllToQueue(); + void AddSelectionToQueue(); /// /// The launch help. diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 6b1fbd63c..c445c28fe 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -179,9 +179,9 @@ - - - + + + diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs index 6c4ca4b69..b61cd55ab 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs @@ -70,6 +70,9 @@ namespace HandBrakeWPF.Views this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control))); // Open Log Window this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control))); // Open Queue Window this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control))); // Add to Queue + this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Alt)), new KeyGesture(Key.A, ModifierKeys.Alt))); // Add all to Queue + this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.A, ModifierKeys.Control | ModifierKeys.Shift))); // Add selection to Queue + this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control))); // File Scan this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Alt)), new KeyGesture(Key.O, ModifierKeys.Alt))); // Scan Window this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Shift))); // Scan a Folder