Skip to content

Commit f3096e3

Browse files
committed
Add a warning about the Python App Execution Alias (address #3522)
1 parent c32f443 commit f3096e3

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

src/UniGetUI/Pages/SettingsPages/ManagersPages/PackageManager.xaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@
115115
TextWrapping="Wrap" />
116116
</controls:SettingsCard.Description>
117117
</controls:SettingsCard>
118+
119+
<controls:SettingsCard
120+
x:Name="AppExecutionAliasWarning"
121+
BorderThickness="1,0,1,1"
122+
CornerRadius="0,0,8,8"
123+
IsClickEnabled="False">
124+
<controls:SettingsCard.HeaderIcon>
125+
<widgets:LocalIcon Icon="Settings" />
126+
</controls:SettingsCard.HeaderIcon>
127+
128+
<controls:SettingsCard.Description>
129+
<TextBlock
130+
x:Name="AppExecutionAliasWarningLabel"
131+
FontFamily="Consolas"
132+
FontSize="14"
133+
TextWrapping="Wrap" />
134+
</controls:SettingsCard.Description>
135+
</controls:SettingsCard>
118136
</StackPanel>
119137
</ScrollViewer>
120138
</Page>

src/UniGetUI/Pages/SettingsPages/ManagersPages/PackageManager.xaml.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
239239
};
240240
ExtraControls.Children.Add(Scoop_CleanupOnStart);
241241
}
242+
242243
// ----------------------------- CHOCO EXTRA SETTINGS ------------------------------
243244

244245
else if (Manager is Chocolatey)
@@ -345,7 +346,18 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
345346
ExtraControls.Children.Add(DisableNotifsCard);
346347
}
347348

348-
base.OnNavigatedTo(e);
349+
// Hide the AppExecutionAliasWarning element if Manager is not Pip
350+
if (Manager is Pip)
351+
{
352+
ManagerLogs.CornerRadius = new CornerRadius(8, 8, 0, 0);
353+
AppExecutionAliasWarningLabel.Text = "If Python cannot be found but is installed on the system, you may need to disable the \"python.exe\" App Execution Alias in the settings.";
354+
}
355+
else
356+
{
357+
AppExecutionAliasWarning.Visibility = Visibility.Collapsed;
358+
}
359+
360+
base.OnNavigatedTo(e);
349361
}
350362

351363
private void ShowVersionHyperlink_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)