Skip to content

Improvements & fixes #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions wingetui/uiSections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,21 +1043,6 @@ def uninstallSelected(self, admin: bool = False, interactive: bool = False) -> N
pass
a = CustomMessageBox(self)
Thread(target=self.confirmUninstallSelected, args=(toUninstall, a, admin, interactive)).start()

def confirmUninstallSelected(self, toUninstall: list[TreeWidgetItemWithQAction], a: CustomMessageBox):
questionData = {
"titlebarTitle": "Wait!",
"mainTitle": _("Are you sure?"),
"mainText": _("Do you really want to uninstall {0}?").format(toUninstall[0].text(1)) if len(toUninstall) == 1 else _("Do you really want to uninstall {0} packages?").format(len(toUninstall)),
"acceptButtonTitle": _("Yes"),
"cancelButtonTitle": _("No"),
"icon": QIcon(),
}
if len(toUninstall) == 0:
return
if a.askQuestion(questionData):
for program in toUninstall:
self.callInMain.emit(partial(self.uninstallPackageItem, program, avoidConfirm=True))

def updatePackageNumber(self, showQueried: bool = False, foundResults: int = 0):
self.foundPackages = len(self.packageItems)
Expand Down Expand Up @@ -1126,13 +1111,15 @@ def addItem(self, package: Package) -> None:

def confirmUninstallSelected(self, toUninstall: list[TreeWidgetItemWithQAction], a: CustomMessageBox, admin: bool = False, interactive: bool = False, removeData: bool = False):
questionData = {
"titlebarTitle": _("Wait!"),
"titlebarTitle": _("Uninstall"),
"mainTitle": _("Are you sure?"),
"mainText": _("Do you really want to uninstall {0}?").format(toUninstall[0].text(1)) if len(toUninstall) == 1 else _("Do you really want to uninstall {0} packages?").format(len(toUninstall)),
"acceptButtonTitle": _("Yes"),
"cancelButtonTitle": _("No"),
"icon": QIcon(),
}
if len(toUninstall) == 0:
return
if a.askQuestion(questionData):
for program in toUninstall:
self.callInMain.emit(partial(self.uninstallPackageItem, program, admin, interactive, removeData, avoidConfirm=True))
Expand Down
10 changes: 5 additions & 5 deletions wingetui/welcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,11 +974,11 @@ def __init__(self, parent=None) -> None:


self.managers = DynamicScrollArea()
winget = WelcomeWizardPackageManager("Winget", "Microsoft's official package manager. Full of well-known and verified packages<br>Contains: <b>General Software, Microsoft Store apps</p>", getMedia("winget_color"))
scoop = WelcomeWizardPackageManager("Scoop", "Great repository of unknown but useful utilities and other interesting packages.<br>Contains: <b>Utilities, Command-line programs, General Software (extras bucket required)</b>", getMedia("scoop_color"))
choco = WelcomeWizardPackageManager("Chocolatey", "The classical package manager for windows. You'll find everything there. <br>Contains: <b>General Software</b>", getMedia("choco_color"))
pip = WelcomeWizardPackageManager("Pip", "Python's library manager. Full of python libraries and other python-related utilities<br>Contains: <b>Python libraries and related utilities</b>", getMedia("pip_color"))
npm = WelcomeWizardPackageManager("Npm", "Node JS's package manager. Full of libraries and other utilities that orbit the javascript world<br>Contains: <b>Node javascript libraries and other related utilities</b>", getMedia("node_color"))
winget = WelcomeWizardPackageManager("Winget", _("Microsoft's official package manager. Full of well-known and verified packages<br>Contains: <b>General Software, Microsoft Store apps</p>"), getMedia("winget_color"))
scoop = WelcomeWizardPackageManager("Scoop", _("Great repository of unknown but useful utilities and other interesting packages.<br>Contains: <b>Utilities, Command-line programs, General Software (extras bucket required)</b>"), getMedia("scoop_color"))
choco = WelcomeWizardPackageManager("Chocolatey", _("The classical package manager for windows. You'll find everything there. <br>Contains: <b>General Software</b>"), getMedia("choco_color"))
pip = WelcomeWizardPackageManager("Pip", _("Python's library manager. Full of python libraries and other python-related utilities<br>Contains: <b>Python libraries and related utilities</b>"), getMedia("pip_color"))
npm = WelcomeWizardPackageManager("Npm", _("Node JS's package manager. Full of libraries and other utilities that orbit the javascript world<br>Contains: <b>Node javascript libraries and other related utilities</b>"), getMedia("node_color"))

managers = [winget, scoop, choco, pip, npm]

Expand Down