diff options
author | sr55 <[email protected]> | 2019-12-29 21:32:16 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2020-01-01 16:32:35 +0000 |
commit | 5978ed460b3c99ac222e30a00c998ea545f04c95 (patch) | |
tree | 8384435c6cc98511c25c66e319f785267773c0cd /win/CS/HandBrakeWPF/Controls | |
parent | 3f4b59109d206ae65efe16f62cd6ef61634c0ce9 (diff) |
WinGui: Improve the way updates are notified. The status label isn't visible when the application starts and will be reset during scan thus wasn't appropiate. The Source Selection Pane which shows on startup will now show a link that opens the Options Update tab.
Diffstat (limited to 'win/CS/HandBrakeWPF/Controls')
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml | 18 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs | 6 |
2 files changed, 20 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml index 7069fde07..91528e23c 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml @@ -5,8 +5,7 @@ xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
- x:Name="sourcePanel"
- >
+ x:Name="sourcePanel">
<UserControl.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
@@ -31,6 +30,7 @@ <RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -109,12 +109,22 @@ </ListBox.ItemTemplate>
</ListBox>
+ <StackPanel Grid.Row="7" Margin="20,10,0,10" Orientation="Horizontal" HorizontalAlignment="Stretch" Visibility="{Binding UpdateAvailable, Converter={StaticResource BooleanToVisibilityConverter}}">
+
+ <Image Source="../Views/Images/information.png" Width="24" />
+ <TextBlock HorizontalAlignment="Center" FontWeight="Bold" Margin="5,0,0,0">
+ <Hyperlink x:Name="UpdateAvailable" NavigateUri="/" RequestNavigate="UpdateAvailable_OnRequestNavigate">
+ <TextBlock Text="{x:Static Properties:Resources.SourceSelection_UpdateAvailable}" TextTrimming="CharacterEllipsis" />
+ </Hyperlink>
+ </TextBlock>
+ </StackPanel>
+
<!-- Cancel Window -->
- <StackPanel Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
+ <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
<Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" IsCancel="True" Padding="8,2" />
</StackPanel>
- <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
+ <StackPanel Grid.Row="9" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
<TextBlock>
<Hyperlink x:Name="Preferences" NavigateUri="/" RequestNavigate="OpenOptions_OnRequestNavigate" ><TextBlock Text="{x:Static Properties:Resources.Preferences}"/></Hyperlink>
</TextBlock>
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs index a6e07e7d1..21308d6ab 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs @@ -71,5 +71,11 @@ namespace HandBrakeWPF.Controls {
Process.Start("https://handbrake.fr/docs");
}
+
+ private void UpdateAvailable_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ MainViewModel vm = this.DataContext as MainViewModel;
+ vm.CheckForUpdates();
+ }
}
}
|