]> granicus.if.org Git - handbrake/commitdiff
WinGui: Further UI / UX Tweaks. Main body of settings disabled until the user perfor...
authorsr55 <sr55.hb@outlook.com>
Sat, 25 Apr 2015 16:35:43 +0000 (16:35 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 25 Apr 2015 16:35:43 +0000 (16:35 +0000)
Keyboard shortcut changes:
Alt+O  -> Open Source Panel   (New)
Ctrl+O -> Open FileScan (Unchanged)
Ctrl+Shift+O  -> Open Folder  (Was Ctrl+R)
Ctrl+F (Removed)

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7125 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/ShellView.xaml.cs

index 6cced25d414c1e9b84b6f1ba963fa62542c1ae35..b351e71bdf1c8034f5828ee54fbe43b69fa3c1cb 100644 (file)
@@ -78,20 +78,20 @@ namespace HandBrakeWPF.Commands
                     mainViewModel.AddToQueue();\r
                 }\r
 \r
-                // Scan a File (Ctrl+F)\r
-                if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.F)\r
+                // Scan a File (Alt+O)\r
+                if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.O)\r
                 {\r
-                    mainViewModel.FileScan();\r
-                    MessageBox.Show("Please use Ctrl-O in future. Ctrl-F is being deprecated in favour of something more standard. :)");\r
+                    mainViewModel.SelectSourceWindow();\r
                 }\r
 \r
+                // Scan a File (Ctrl+O)\r
                 if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.O)\r
                 {\r
                     mainViewModel.FileScan();\r
                 }\r
 \r
-                // Scan a Folder (Ctrl+R)\r
-                if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.R)\r
+                // Scan a Folder (Ctrl+Shift+O)\r
+                if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift)  && gesture.Key == Key.O)\r
                 {\r
                     mainViewModel.FolderScan();\r
                 }\r
index 8e66c661e90aafc40d220cd9003a33b37de4d272..a47a708654cdb6cc0eb009c65e7ccdb871ce2629 100644 (file)
@@ -49,6 +49,11 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// </returns>\r
         bool AddToQueue();\r
 \r
+        /// <summary>\r
+        /// The select source window.\r
+        /// </summary>\r
+        void SelectSourceWindow();\r
+\r
         /// <summary>\r
         /// File Scan\r
         /// </summary>\r
index 7d9e9d2c243cc8f0b5880a0c996acfa255962129..2dc7064099c0b2ab99c08cb239cb079cfd61a215 100644 (file)
@@ -205,6 +205,8 @@ namespace HandBrakeWPF.ViewModels
 \r
         private string alertWindowText;\r
 \r
+        private bool hasSource;\r
+\r
         #endregion\r
 \r
         /// <summary>\r
@@ -258,6 +260,7 @@ namespace HandBrakeWPF.ViewModels
             this.CurrentTask = new EncodeTask();\r
             this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;\r
             this.ScannedSource = new Source();\r
+            this.HasSource = false;\r
 \r
             // Setup Events\r
             this.scanService.ScanStared += this.ScanStared;\r
@@ -1157,6 +1160,26 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether has source.\r
+        /// </summary>\r
+        public bool HasSource\r
+        {\r
+            get\r
+            {\r
+                return this.hasSource;\r
+            }\r
+            set\r
+            {\r
+                if (value.Equals(this.hasSource))\r
+                {\r
+                    return;\r
+                }\r
+                this.hasSource = value;\r
+                this.NotifyOfPropertyChange(() => this.HasSource);\r
+            }\r
+        }\r
+\r
         #endregion\r
 \r
         #region Load and Shutdown Handling\r
@@ -2168,6 +2191,7 @@ namespace HandBrakeWPF.ViewModels
                     {\r
                         this.NotifyOfPropertyChange(() => this.ScannedSource);\r
                         this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);\r
+                        this.HasSource = true;\r
                         this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.MainTitle) ?? this.ScannedSource.Titles.FirstOrDefault();\r
                     }\r
                     else\r
index 36c7237c6e7569aefd0de3d69ad76f514814e682..018a1fce273867b4a8da281e276d7ea128d0dd24 100644 (file)
@@ -6,7 +6,6 @@
              xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"\r
              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"\r
              xmlns:commands="clr-namespace:HandBrakeWPF.Commands"\r
-             xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"\r
              AllowDrop="True"\r
         FontSize="11"\r
         Micro:Message.Attach="[Event Loaded] = [Action Load]"\r
         </StackPanel>\r
 \r
         <!--  Main Body  -->\r
-        <Grid Grid.Row="1"  IsEnabled="{Binding ShowSourceSelection, Converter={StaticResource booleanConverter}, ConverterParameter=true}">\r
+        <Grid Grid.Row="1"  IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">\r
             <Grid.ColumnDefinitions>\r
                 <ColumnDefinition Width="*" MinWidth="700"/>\r
                 <ColumnDefinition Width="Auto" />\r
index e38e37c46de3dc9580188f81a2c5045251cde003..ebfb1743dd6b2bc5532c3074d7d89ab704088428 100644 (file)
@@ -62,23 +62,15 @@ namespace HandBrakeWPF.Views
                 this.StateChanged += this.ShellViewStateChanged;\r
             }\r
 \r
-            // Start Encode (Ctrl+S)\r
-            // Stop Encode (Ctrl+K)\r
-            // Open Log Window (Ctrl+L)\r
-            // Open Queue Window (Ctrl+Q)\r
-            // Add to Queue (Ctrl+A)\r
-            // Scan a File (Ctrl+F)\r
-            // Scan a Folder (Ctrl+R)\r
-\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F, ModifierKeys.Control)), new KeyGesture(Key.F, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.R, ModifierKeys.Control)), new KeyGesture(Key.R, ModifierKeys.Control)));\r
-            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)));\r
+            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control))); // Start Encode\r
+            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control))); // Stop Encode\r
+            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.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
+            this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift))); // Garbage Colleciton\r
 \r
             // Enable Windows 7 Taskbar progress indication.\r
             if (this.TaskbarItemInfo == null)\r