diff options
author | sr55 <[email protected]> | 2013-06-06 20:12:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-06-06 20:12:39 +0000 |
commit | bf71f7590e716bee6bc944db9084c8237610f7f5 (patch) | |
tree | e6203019852fb445806df446ba4f0620af4798ff | |
parent | 357f940f74b0b110b24770bafc752ff588f47f69 (diff) |
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
-rw-r--r-- | win/CS/HandBrakeWPF/Model/SourceMenuItem.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 1 | ||||
-rw-r--r-- | 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.
/// </summary>
public object Tag { get; set; }
+
+ /// <summary>
+ /// Gets or sets the input gesture text.
+ /// </summary>
+ 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"
>
- <MenuItem Header="File">
- <MenuItem Header="Cancel Scan" Command="{Binding CancelScanCommand}" />
+ <MenuItem Header="_File">
+ <MenuItem Header="_Cancel Scan" Command="{Binding CancelScanCommand}" />
<Separator />
- <MenuItem Header="Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="_Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" InputGestureText="Alt + F4" />
</MenuItem>
- <MenuItem Header="Tools">
- <MenuItem Header="Show Queue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]">
+ <MenuItem Header="_Tools">
+ <MenuItem Header="_Show Queue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]" InputGestureText="Ctrl + Q">
<MenuItem.Icon>
<Image Width="16" Source="Images/Queue_Small.png" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Activity Log" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
+ <MenuItem Header="_Activity Log" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]" InputGestureText="Ctrl + L">
<MenuItem.Icon>
<Image Width="16" Source="Images/Output_Small.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
- <MenuItem Header="Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
+ <MenuItem Header="_Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
<MenuItem.Icon>
<Image Width="16" Source="Images/Pref_Small.png" />
</MenuItem.Icon>
@@ -122,8 +122,8 @@ </MenuItem>
- <MenuItem Header="Presets" x:Name="presetMenu">
- <MenuItem Header="Presets" ItemsSource="{Binding Presets}">
+ <MenuItem Header="_Presets" x:Name="presetMenu">
+ <MenuItem Header="_Presets" ItemsSource="{Binding Presets}">
<MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Tag" Value="{Binding}" />
@@ -138,21 +138,21 @@ </MenuItem.ItemContainerStyle>
</MenuItem>
<Separator />
- <MenuItem Header="Import" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
- <MenuItem Header="Export" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
+ <MenuItem Header="_Import" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
+ <MenuItem Header="_Export" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
<Separator />
- <MenuItem Header="Set Current as Default" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
- <MenuItem Header="Reset Built-In Presets" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
+ <MenuItem Header="_Set Current as Default" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
+ <MenuItem Header="_Reset Built-In Presets" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
<Separator />
<MenuItem IsCheckable="True" x:Name="showPresetPanelMenuItem" IsChecked="{Binding IsPresetPanelShowing}">
<MenuItem.Style>
<Style TargetType="MenuItem">
<Style.Triggers>
<DataTrigger Binding="{Binding IsChecked, ElementName=showPresetPanelMenuItem}" Value="True">
- <Setter Property="Header" Value="Hide Preset Panel"/>
+ <Setter Property="Header" Value="_Hide Preset Panel"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsChecked, ElementName=showPresetPanelMenuItem}" Value="False">
- <Setter Property="Header" Value="Show Preset Panel"/>
+ <Setter Property="Header" Value="S_how Preset Panel"/>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -160,21 +160,21 @@ </MenuItem>
</MenuItem>
- <MenuItem Header="Help">
- <MenuItem Header="HandBrake User Guide (HTTP)" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]">
+ <MenuItem Header="_Help">
+ <MenuItem Header="_HandBrake User Guide (HTTP)" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/information.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
- <MenuItem Header="Check for Updates" Micro:Message.Attach="[Event Click] = [Action CheckForUpdates]" />
+ <MenuItem Header="_Check for Updates" Micro:Message.Attach="[Event Click] = [Action CheckForUpdates]" />
<Separator />
- <MenuItem Header="About..." Micro:Message.Attach="[Event Click] = [Action OpenAboutApplication]" />
+ <MenuItem Header="_About..." Micro:Message.Attach="[Event Click] = [Action OpenAboutApplication]" />
</MenuItem>
- <MenuItem Header="Debug" Visibility="{Binding ShowDebugMenu, Converter={StaticResource boolToVisConverter}}" >
- <MenuItem Header="Show CLI Equiv" Micro:Message.Attach="[Event Click] = [Action ShowCliQuery]" />
- <MenuItem Header="Debug Scan Log" Micro:Message.Attach="[Event Click] = [Action DebugScanLog]" />
+ <MenuItem Header="_Debug" Visibility="{Binding ShowDebugMenu, Converter={StaticResource boolToVisConverter}}" >
+ <MenuItem Header="_Show CLI Equiv" Micro:Message.Attach="[Event Click] = [Action ShowCliQuery]" />
+ <MenuItem Header="_Debug Scan Log" Micro:Message.Attach="[Event Click] = [Action DebugScanLog]" />
</MenuItem>
</Menu>
@@ -207,6 +207,7 @@ <Setter Property="MenuItem.CommandParameter" Value="123"/>
<Setter Property="ItemsSource" Value="{Binding Children}" />
<Setter Property="Icon" Value="{Binding Image}" />
+ <Setter Property="InputGestureText" Value="{Binding InputGestureText}" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
@@ -664,18 +665,12 @@ />
<!-- Status Bar -->
- <StatusBar Grid.Row="2"
- Grid.ColumnSpan="2"
- Height="32"
- Margin="0"
- VerticalAlignment="Bottom"
- Padding="0"
- >
+ <StatusBar Grid.Row="2" Grid.ColumnSpan="2" MinHeight="32" >
+
+ <ProgressBar Value="{Binding ProgressPercentage}" Visibility="{Binding IsEncoding, Converter={StaticResource boolToVisConverter}}"
+ Width="100" Height="18" VerticalAlignment="Center"/>
<Label VerticalAlignment="Center"
- Content="{Binding Path=ProgramStatusLabel}"
- FontSize="11"
- Padding="0,0,0,5"
- />
+ Content="{Binding Path=ProgramStatusLabel}" />
</StatusBar>
</Grid>
|