From bf71f7590e716bee6bc944db9084c8237610f7f5 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 6 Jun 2013 20:12:39 +0000 Subject: WinGui: Better keyboard navigation in the GUI. Added an encode progress bar back in. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5570 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Model/SourceMenuItem.cs | 5 ++ win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 10 +++- win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 1 - win/CS/HandBrakeWPF/Views/MainView.xaml | 61 +++++++++++------------- 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/win/CS/HandBrakeWPF/Model/SourceMenuItem.cs b/win/CS/HandBrakeWPF/Model/SourceMenuItem.cs index f0b809849..4be52964e 100644 --- a/win/CS/HandBrakeWPF/Model/SourceMenuItem.cs +++ b/win/CS/HandBrakeWPF/Model/SourceMenuItem.cs @@ -55,5 +55,10 @@ namespace HandBrakeWPF.Model /// Gets or sets the tag. /// public object Tag { get; set; } + + /// + /// Gets or sets the input gesture text. + /// + public string InputGestureText { get; set; } } } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c7fcbd0ae..222b8a71c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -922,6 +922,8 @@ namespace HandBrakeWPF.ViewModels } } + public int ProgressPercentage { get; set; } + #endregion #region Load and Shutdown Handling @@ -1910,6 +1912,8 @@ namespace HandBrakeWPF.ViewModels } lastEncodePercentage = percent; + this.ProgressPercentage = percent; + this.NotifyOfPropertyChange(() => ProgressPercentage); } else { @@ -2016,14 +2020,16 @@ namespace HandBrakeWPF.ViewModels Image = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/HandBrake;component/Views/Images/folder.png")), Width = 16, Height = 16 }, Text = "Open Folder", Command = new SourceMenuCommand(this.FolderScan), - IsDrive = false + IsDrive = false, + InputGestureText = "Ctrl + R" }; SourceMenuItem fileScan = new SourceMenuItem { Image = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/HandBrake;component/Views/Images/Movies.png")), Width = 16, Height = 16 }, Text = "Open File", Command = new SourceMenuCommand(this.FileScan), - IsDrive = false + IsDrive = false, + InputGestureText = "Ctrl + F" }; SourceMenuItem titleSpecific = new SourceMenuItem { Text = "Title Specific Scan" }; diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 0df0c47a9..a59c9c32f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -951,7 +951,6 @@ namespace HandBrakeWPF.ViewModels width = 720; } - // TODO figure out what is wrong with this?? return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height); } diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index fd95a5b53..efefca5cd 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -96,25 +96,25 @@ HorizontalAlignment="Stretch" VerticalAlignment="Top" > - - + + - + - - + + - + - + @@ -122,8 +122,8 @@ - - + + @@ -160,21 +160,21 @@ - - + + - + - + - - - + + + @@ -207,6 +207,7 @@ + @@ -664,18 +665,12 @@ /> - + + + -- cgit v1.2.3