Skip to content
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

identify ubisoft connect #565

Merged
merged 2 commits into from
Dec 31, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added wingetui/resources/uplay_black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wingetui/resources/uplay_white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion wingetui/storeEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def runInstallation(self) -> None:
self.progressbar.setValue(0)
if self.progressbar.invertedAppearance(): self.progressbar.setInvertedAppearance(False)
self.finishedInstallation = False
if(self.store == "winget" or self.store.lower() in ("local pc", "microsoft store", "steam", "gog")):
if(self.store == "winget" or self.store.lower() in ("local pc", "microsoft store", "steam", "gog", "ubisoft connect")):
self.p = subprocess.Popen(self.adminstr + [wingetHelpers.winget, "uninstall", "-e"] + (["--id", self.packageId] if self.useId else ["--name", self.programName]) + wingetHelpers.common_params + self.cmdline_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, shell=True, cwd=sudoLocation, env=os.environ)
self.t = KillableThread(target=wingetHelpers.uninstallAssistant, args=(self.p, self.finishInstallation, self.addInfoLine, self.counterSignal))
self.t.start()
Expand Down
9 changes: 7 additions & 2 deletions wingetui/uiSections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ def showMenu(pos: QPoint):
contextMenu.addSeparator()
else:
contextMenu.addAction(ins5)
if self.packageList.currentItem().text(4).lower() not in ("local pc", "microsoft store", "steam", "gog"):
if self.packageList.currentItem().text(4).lower() not in ("local pc", "microsoft store", "steam", "gog", "ubisoft connect"):
contextMenu.addAction(ins4)

contextMenu.exec(QCursor.pos())
Expand Down Expand Up @@ -1431,7 +1431,7 @@ def showMenu(pos: QPoint):

def showInfo():
item = self.packageList.currentItem()
if item.text(4).lower() in ("local pc", "microsoft store", "steam", "gog"):
if item.text(4).lower() in ("local pc", "microsoft store", "steam", "gog", "ubisoft connect"):
self.err = ErrorMessage(self.window())
errorData = {
"titlebarTitle": _("Unable to load informarion"),
Expand Down Expand Up @@ -1557,6 +1557,7 @@ def setAllSelected(checked: bool) -> None:
self.MSStoreIcon = QIcon(getMedia("msstore"))
self.SteamIcon = QIcon(getMedia("steam"))
self.GOGIcon = QIcon(getMedia("gog"))
self.UPLAYIcon = QIcon(getMedia("uplay"))


if not getSettings("DisableWinget"):
Expand Down Expand Up @@ -1734,6 +1735,8 @@ def addItem(self, name: str, id: str, version: str, store: str) -> None:
if store.lower() == "local pc":
if id == "Steam":
store = "Steam"
if id == "Uplay":
store = "Ubisoft Connect"
if id.count("_is1") == 1:
store = "GOG"
for letter in id:
Expand Down Expand Up @@ -1767,6 +1770,8 @@ def addItem(self, name: str, id: str, version: str, store: str) -> None:
item.setIcon(4, self.SteamIcon)
elif "gog" in store.lower():
item.setIcon(4, self.GOGIcon)
elif "ubisoft connect" in store.lower():
item.setIcon(4, self.UPLAYIcon)
else:
item.setIcon(4, self.MSStoreIcon)
item.setText(4, store)
Expand Down