]> granicus.if.org Git - handbrake/commitdiff
WinGui: Add shortcuts for All All to Queue and Add Selection. Display shortcuts...
authorsr55 <sr55.hb@outlook.com>
Sun, 4 Nov 2018 20:59:02 +0000 (20:59 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 4 Nov 2018 20:59:02 +0000 (20:59 +0000)
win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/ShellView.xaml.cs

index 064b6fe51044536e3785ef9f115c82109b1bf0ff..dfa0830a493631762e6c8c4f6c9de451eb29824b 100644 (file)
@@ -78,6 +78,18 @@ namespace HandBrakeWPF.Commands
                     mainViewModel.AddToQueue();\r
                 }\r
 \r
+                // Add all to Queue (Alt+A)\r
+                if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.A)\r
+                {\r
+                    mainViewModel.AddAllToQueue();\r
+                }\r
+\r
+                // Add selection to Queue (Control+Shift+A)\r
+                if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && gesture.Key == Key.A)\r
+                {\r
+                    mainViewModel.AddSelectionToQueue();\r
+                }\r
+\r
                 // Scan a File (Alt+O)\r
                 if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.O)\r
                 {\r
index b4156752ee128690a33ad831272ae9d54a33fd44..3f0c6ae2eea85cd5cd6a84e58e07e0e7ccee83b8 100644 (file)
@@ -50,6 +50,8 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// True if added, false if error\r
         /// </returns>\r
         bool AddToQueue();\r
+        void AddAllToQueue();\r
+        void AddSelectionToQueue();\r
 \r
         /// <summary>\r
         /// The launch help.\r
index 6b1fbd63c5ab7dfc0acdda8f045309a30f1adda3..c445c28fe5e6e81fef7f6ac035f0810e02117f24 100644 (file)
                     </StackPanel>\r
                     <Button.ContextMenu>\r
                         <ContextMenu>\r
-                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddCurrent}" cal:Message.Attach="[Event Click] = [Action AddToQueue]" AutomationProperties.Name="Add Current" />\r
-                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddAll}" cal:Message.Attach="[Event Click] = [Action AddAllToQueue]" AutomationProperties.Name="Add all to Queue" />\r
-                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddSelection}" cal:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" AutomationProperties.Name="Add Selection to Queue" />\r
+                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddCurrent}" cal:Message.Attach="[Event Click] = [Action AddToQueue]" AutomationProperties.Name="Add Current" InputGestureText="Ctrl + A" />\r
+                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddAll}" cal:Message.Attach="[Event Click] = [Action AddAllToQueue]" AutomationProperties.Name="Add all to Queue" InputGestureText="Alt + A" />\r
+                            <MenuItem Header="{x:Static Properties:Resources.MainView_AddSelection}" cal:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" AutomationProperties.Name="Add Selection to Queue" InputGestureText="Ctrl + Shift + A" />\r
                         </ContextMenu>\r
                     </Button.ContextMenu>\r
 \r
index 6c4ca4b69a8a81bbf609be19ba5d09a13f6b9302..b61cd55ab7c86b39582fe6b6d51a86c1496b088d 100644 (file)
@@ -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\r
             this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control))); // Open Queue Window\r
             this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control))); // Add to Queue\r
+            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Alt)), new KeyGesture(Key.A, ModifierKeys.Alt))); // Add all to Queue\r
+            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\r
+\r
             this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control))); // File Scan\r
             this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Alt)), new KeyGesture(Key.O, ModifierKeys.Alt)));     // Scan Window\r
             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\r