diff options
author | sr55 <[email protected]> | 2015-08-23 21:17:52 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-08-23 21:17:52 +0000 |
commit | c20a45fac6c5a4a3052f103e8d1070aec152b259 (patch) | |
tree | 106ca4b3f0a86771db32ce6f488e33ae2ef81470 | |
parent | 5266fbb40c1989642de17b0481536d5a3360a4fa (diff) |
WinGui: If the Queue Recovery doesn't return any results, show the "Source Selection" pane when the app starts up. Added quick access links to the preferences / About HandBrake Panes on this panel.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7411 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml | 11 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 8 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 4 |
5 files changed, 35 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml index c887a1c1e..b5726fb40 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml @@ -19,6 +19,7 @@ <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -103,6 +104,16 @@ <Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" Padding="8,2" />
</StackPanel>
+ <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
+ <TextBlock>
+ <Hyperlink x:Name="Preferences" NavigateUri="/" RequestNavigate="OpenOptions_OnRequestNavigate" >Preferences</Hyperlink>
+ </TextBlock>
+ <TextBlock Text="|" Margin="5,0,5,0"/>
+ <TextBlock>
+ <Hyperlink x:Name="AboutHandBrake" NavigateUri="/" RequestNavigate="AboutHandBrake_OnRequestNavigate" >About HandBrake</Hyperlink>
+ </TextBlock>
+ </StackPanel>
+
</Grid>
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs index 5d04af6f8..c487f5b98 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs @@ -10,6 +10,9 @@ namespace HandBrakeWPF.Controls
{
using System.Windows.Controls;
+ using System.Windows.Navigation;
+
+ using HandBrakeWPF.ViewModels;
/// <summary>
/// Interaction logic for SourceSelection.xaml
@@ -23,5 +26,17 @@ namespace HandBrakeWPF.Controls {
this.InitializeComponent();
}
+
+ private void AboutHandBrake_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ MainViewModel vm = this.DataContext as MainViewModel;
+ vm.OpenAboutApplication();
+ }
+
+ private void OpenOptions_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ MainViewModel vm = this.DataContext as MainViewModel;
+ vm.OpenOptionsWindow();
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c614dde2d..919f82389 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1227,7 +1227,13 @@ namespace HandBrakeWPF.ViewModels this.presetService.Load();
// Queue Recovery
- QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService);
+ bool queueRecovered = QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService);
+
+ // If the queue is not recovered, show the source selection window by default.
+ if (!queueRecovered)
+ {
+ this.ShowSourceSelection = true;
+ }
this.SelectedPreset = this.presetService.DefaultPreset;
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index fe2e4dad7..ff8ebc600 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -89,7 +89,7 @@ </MenuItem.Icon>
</MenuItem>
<Separator />
- <MenuItem Header="_Options" cal:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
+ <MenuItem Header="_Preferences" cal:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
<MenuItem.Icon>
<Image Width="16" Source="Images/Pref_Small.png" />
</MenuItem.Icon>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index e85874316..956c3d602 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -59,12 +59,10 @@ <!-- Row 1 -->
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
- <TextBlock Text="Options" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" Grid.ColumnSpan="2" />
+ <TextBlock Text="Preferences" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" Grid.ColumnSpan="2" />
</StackPanel>
-
-
<Border BorderBrush="DarkGray" Grid.Column="0" Grid.Row="1" BorderThickness="0,0,1,0">
<StackPanel Orientation="Vertical" Margin="11,5,-1,0">
|