diff options
author | sr55 <[email protected]> | 2019-12-29 21:32:16 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2019-12-29 21:32:16 +0000 |
commit | 0b089e9d1e20ad2240b20efff74eb3fd581ae235 (patch) | |
tree | 2d4870f1b4aa043b57d217c845a7dd740c454107 /win/CS/HandBrakeWPF/Controls | |
parent | 3ebc8137733d0e211b82bc0c0067f1f04a6c2390 (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();
+ }
}
}
|