This commit is contained in:
Viktor Szépe
2025-10-14 19:51:53 +02:00
committed by GitHub
parent 72cbdca556
commit 1f81eec8f1
19 changed files with 28 additions and 28 deletions

View File

@@ -41,7 +41,7 @@
$selectedAppRemoveButton.Add_MouseEnter({ $this.Foreground = "Red" })
$selectedAppRemoveButton.Add_MouseLeave({ $this.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") })
$selectedAppRemoveButton.Add_Click({
$sync.($this.Tag).isChecked = $false # On click of the remove button, we only have to uncheck the corresponding checkbox. This will kick of all neccessary changes to update the UI
$sync.($this.Tag).isChecked = $false # On click of the remove button, we only have to uncheck the corresponding checkbox. This will kick of all necessary changes to update the UI
})
[System.Windows.Controls.Grid]::SetColumn($selectedAppRemoveButton, 1)
$selectedAppGrid.Children.Add($selectedAppRemoveButton)

View File

@@ -13,7 +13,7 @@ function Get-LocalizedYesNo {
#>
# Run choice and capture its options as output
# The output shows the options for Yes and No as "[Y,N]?" in the (partitially) localized format.
# The output shows the options for Yes and No as "[Y,N]?" in the (partially) localized format.
# eg. English: [Y,N]?
# Dutch: [Y,N]?
# German: [J,N]?

View File

@@ -8,7 +8,7 @@
Also creates an overlay with a progress bar and text to indicate that an install or uninstall is in progress
.PARAMETER TargetElement
The element to which the AppArea shoud be added
The element to which the AppArea should be added
#>
param($TargetElement)

View File

@@ -1,7 +1,7 @@
function Initialize-InstallAppEntry {
<#
.SYNOPSIS
Creates the app entry to be placed on the isntall tab for a given app
Creates the app entry to be placed on the install tab for a given app
Used to as part of the Install Tab UI generation
.PARAMETER TargetElement
The Element into which the Apps should be placed

View File

@@ -54,7 +54,7 @@ function Invoke-WinUtilTweaks {
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
$changeservice = $true
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable memeber, which's the 'OriginalService' Property
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable member, which's the 'OriginalService' Property
if($KeepServiceStartup -AND !($undo)) {
try {
# Check if the service exists

View File

@@ -6,35 +6,35 @@ function Set-PackageManagerPreference {
Reads from preference.ini if no argument sent.
.PARAMETER preferedPackageManager
.PARAMETER preferredPackageManager
The PackageManager that was selected.
#>
param(
[Parameter(Position=0, Mandatory=$false)]
[PackageManagers]$preferedPackageManager
[PackageManagers]$preferredPackageManager
)
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
#Try loading from file if no argument given.
if ($null -eq $preferedPackageManager) {
if ($null -eq $preferredPackageManager) {
# Backwards compat for preferChocolatey.ini
if (Test-Path -Path $oldChocoPath) {
$preferedPackageManager = [PackageManagers]::Choco
$preferredPackageManager = [PackageManagers]::Choco
Remove-Item -Path $oldChocoPath
}
elseif (Test-Path -Path $preferencePath) {
$potential = Get-Content -Path $preferencePath -TotalCount 1
$preferedPackageManager = [PackageManagers]$potential
$preferredPackageManager = [PackageManagers]$potential
}
else {
Write-Debug "Creating new preference file, defaulting to winget."
$preferedPackageManager = [PackageManagers]::Winget
$preferredPackageManager = [PackageManagers]::Winget
}
}
$sync["ManagerPreference"] = [PackageManagers]::$preferedPackageManager
$sync["ManagerPreference"] = [PackageManagers]::$preferredPackageManager
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"

View File

@@ -4,7 +4,7 @@ function Set-WinUtilProgressbar{
This function is used to Update the Progress Bar displayed in the winutil GUI.
It will be automatically hidden if the user clicks something and no process is running
.PARAMETER Label
The Text to be overlayed onto the Progress Bar
The Text to be overlaid onto the Progress Bar
.PARAMETER PERCENT
The percentage of the Progress Bar that should be filled (0-100)
#>

View File

@@ -33,7 +33,7 @@ function Test-WinUtilPackageManager {
$wingetVersionFull = ($wingetInfo | Select-String -Pattern 'Package Manager v\d+\.\d+\.\d+').Matches.Value.Split(' ')[-1]
}
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
Write-Warning "Winget was not found due to un-availablity reasons"
Write-Warning "Winget was not found due to un-availability reasons"
$wingetExists = $false
} catch {
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
@@ -41,7 +41,7 @@ function Test-WinUtilPackageManager {
}
# If Winget is available, Parse it's Version and give proper information to Terminal Output.
# If it isn't available, the return of this funtion will be "not-installed", indicating that
# If it isn't available, the return of this function will be "not-installed", indicating that
# Winget isn't installed/available on The System.
if ($wingetExists) {
# Check if Preview Version
@@ -55,7 +55,7 @@ function Test-WinUtilPackageManager {
# Check if Winget's Version is too old.
$wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v'))
# Grabs the latest release of Winget from the Github API for version check process.
# Grabs the latest release of Winget from the GitHub API for version check process.
$response = winget search -e Microsoft.AppInstaller --accept-source-agreements
$wingetLatestVersion = ($response | Select-String -Pattern '\d+\.\d+\.\d+\.\d+').Matches.Value
Write-Host "Latest Search Version: $wingetLatestVersion" -ForegroundColor White