diff --git a/wingetui/resources/steam_black.png b/wingetui/resources/steam_black.png new file mode 100644 index 000000000..429f3966c Binary files /dev/null and b/wingetui/resources/steam_black.png differ diff --git a/wingetui/resources/steam_white.png b/wingetui/resources/steam_white.png new file mode 100644 index 000000000..86525a868 Binary files /dev/null and b/wingetui/resources/steam_white.png differ diff --git a/wingetui/storeEngine.py b/wingetui/storeEngine.py index 489205ad4..95eb39020 100644 --- a/wingetui/storeEngine.py +++ b/wingetui/storeEngine.py @@ -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")): + if(self.store == "winget" or self.store.lower() in ("local pc", "microsoft store", "steam")): 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() diff --git a/wingetui/uiSections.py b/wingetui/uiSections.py index a8ae19f73..eb1638850 100644 --- a/wingetui/uiSections.py +++ b/wingetui/uiSections.py @@ -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"): + if self.packageList.currentItem().text(4).lower() not in ("local pc", "microsoft store", "steam"): contextMenu.addAction(ins4) contextMenu.exec(QCursor.pos()) @@ -1431,7 +1431,7 @@ def showMenu(pos: QPoint): def showInfo(): item = self.packageList.currentItem() - if item.text(4).lower() in ("local pc", "microsoft store"): + if item.text(4).lower() in ("local pc", "microsoft store", "steam"): self.err = ErrorMessage(self.window()) errorData = { "titlebarTitle": _("Unable to load informarion"), @@ -1555,6 +1555,7 @@ def setAllSelected(checked: bool) -> None: self.scoopIcon = QIcon(getMedia("scoop")) self.localIcon = QIcon(getMedia("localpc")) self.MSStoreIcon = QIcon(getMedia("msstore")) + self.SteamIcon = QIcon(getMedia("steam")) if not getSettings("DisableWinget"): @@ -1729,6 +1730,10 @@ def addItem(self, name: str, id: str, version: str, store: str) -> None: store = "Winget" break + if store.lower() == "local pc": + if id == "Steam": + store = "Steam" + if store.lower() == "winget": if len(id.split("_")[-1]) == 13 and len(id.split("_"))==2: store = "Microsoft Store" @@ -1747,6 +1752,8 @@ def addItem(self, name: str, id: str, version: str, store: str) -> None: item.setIcon(4, self.wingetIcon) elif "local pc" in store.lower(): item.setIcon(4, self.localIcon) + elif "steam" in store.lower(): + item.setIcon(4, self.SteamIcon) else: item.setIcon(4, self.MSStoreIcon) item.setText(4, store)