diff options
author | sr55 <[email protected]> | 2015-04-25 16:35:43 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-25 16:35:43 +0000 |
commit | 780d8a9a1c86a27c8608f0cdca3a8b58cc9fb894 (patch) | |
tree | 212d93ed4dcca8274f755e005487dfe2e62eb238 | |
parent | ca6ad7f1c6f414758a99ea82bdfa9e64aae6aada (diff) |
WinGui: Further UI / UX Tweaks. Main body of settings disabled until the user performs a scan.
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
-rw-r--r-- | win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs | 12 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 24 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ShellView.xaml.cs | 26 |
5 files changed, 45 insertions, 25 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs index 6cced25d4..b351e71bd 100644 --- a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs @@ -78,20 +78,20 @@ namespace HandBrakeWPF.Commands mainViewModel.AddToQueue();
}
- // Scan a File (Ctrl+F)
- if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.F)
+ // Scan a File (Alt+O)
+ if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.O)
{
- mainViewModel.FileScan();
- MessageBox.Show("Please use Ctrl-O in future. Ctrl-F is being deprecated in favour of something more standard. :)");
+ mainViewModel.SelectSourceWindow();
}
+ // Scan a File (Ctrl+O)
if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.O)
{
mainViewModel.FileScan();
}
- // Scan a Folder (Ctrl+R)
- if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.R)
+ // Scan a Folder (Ctrl+Shift+O)
+ if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && gesture.Key == Key.O)
{
mainViewModel.FolderScan();
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs index 8e66c661e..a47a70865 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs @@ -50,6 +50,11 @@ namespace HandBrakeWPF.ViewModels.Interfaces bool AddToQueue();
/// <summary>
+ /// The select source window.
+ /// </summary>
+ void SelectSourceWindow();
+
+ /// <summary>
/// File Scan
/// </summary>
void FileScan();
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 7d9e9d2c2..2dc706409 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -205,6 +205,8 @@ namespace HandBrakeWPF.ViewModels private string alertWindowText;
+ private bool hasSource;
+
#endregion
/// <summary>
@@ -258,6 +260,7 @@ namespace HandBrakeWPF.ViewModels this.CurrentTask = new EncodeTask();
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
+ this.HasSource = false;
// Setup Events
this.scanService.ScanStared += this.ScanStared;
@@ -1157,6 +1160,26 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether has source.
+ /// </summary>
+ public bool HasSource
+ {
+ get
+ {
+ return this.hasSource;
+ }
+ set
+ {
+ if (value.Equals(this.hasSource))
+ {
+ return;
+ }
+ this.hasSource = value;
+ this.NotifyOfPropertyChange(() => this.HasSource);
+ }
+ }
+
#endregion
#region Load and Shutdown Handling
@@ -2168,6 +2191,7 @@ namespace HandBrakeWPF.ViewModels {
this.NotifyOfPropertyChange(() => this.ScannedSource);
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);
+ this.HasSource = true;
this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.MainTitle) ?? this.ScannedSource.Titles.FirstOrDefault();
}
else
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 36c7237c6..018a1fce2 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -6,7 +6,6 @@ xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
- xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
AllowDrop="True"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
@@ -349,7 +348,7 @@ </StackPanel>
<!-- Main Body -->
- <Grid Grid.Row="1" IsEnabled="{Binding ShowSourceSelection, Converter={StaticResource booleanConverter}, ConverterParameter=true}">
+ <Grid Grid.Row="1" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="700"/>
<ColumnDefinition Width="Auto" />
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs index e38e37c46..ebfb1743d 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs @@ -62,23 +62,15 @@ namespace HandBrakeWPF.Views this.StateChanged += this.ShellViewStateChanged;
}
- // Start Encode (Ctrl+S)
- // Stop Encode (Ctrl+K)
- // Open Log Window (Ctrl+L)
- // Open Queue Window (Ctrl+Q)
- // Add to Queue (Ctrl+A)
- // Scan a File (Ctrl+F)
- // Scan a Folder (Ctrl+R)
-
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control)));
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control)));
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control)));
- 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.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control))); // Start Encode
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control))); // Stop Encode
+ 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.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
+ 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
// Enable Windows 7 Taskbar progress indication.
if (this.TaskbarItemInfo == null)
|