Skip to content

Commit

Permalink
(chocolatey#911) Add missing disabling of install buttons
Browse files Browse the repository at this point in the history
This commit updates both the install and the advanced install
buttons to be disabled if the user running the application are
not allowed to install any backages (only relevant when a
Chocolatey licensed and Chocolatey GUI licensed extensions
are installed).
  • Loading branch information
AdmiringWorm committed Feb 1, 2022
1 parent 6ffea8c commit f8773fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/ChocolateyGui.Common.Windows/Views/PackageView.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<UserControl x:Class="ChocolateyGui.Common.Windows.Views.PackageView"
<UserControl x:Class="ChocolateyGui.Common.Windows.Views.PackageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -70,6 +70,7 @@
</StackPanel>
</Button>
<StackPanel Orientation="Horizontal"
IsEnabled="{Binding IsInstallAllowed}"
Visibility="{Binding IsInstalled, Converter={StaticResource BooleanToVisibility}, ConverterParameter=True}">
<Button Padding="10" Margin="5 0"
Command="{commands:DataContextCommandAdapter InstallAdvanced}">
Expand All @@ -85,6 +86,7 @@
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal"
IsEnabled="{Binding IsInstallAllowed}"
Visibility="{Binding IsInstalled, Converter={StaticResource BooleanToVisibility}, ConverterParameter=True}">
<Button Padding="10" Margin="5 0"
Command="{commands:DataContextCommandAdapter Install}">
Expand Down

0 comments on commit f8773fc

Please sign in to comment.