diff --git a/wingetui/uiSections.py b/wingetui/uiSections.py
index 44c283760..df7561ced 100644
--- a/wingetui/uiSections.py
+++ b/wingetui/uiSections.py
@@ -1942,110 +1942,122 @@ def __init__(self, parent = None):
self.layout.addWidget(title)
self.layout.addSpacing(15)
-
- table = QTableWidget()
- table.setAutoFillBackground(True)
- table.setStyleSheet("*{border: 0px solid transparent; background-color: transparent;}QHeaderView{font-size: 13pt;padding: 0px;margin: 0px;}QTableCornerButton::section,QHeaderView,QHeaderView::section,QTableWidget,QWidget,QTableWidget::item{background-color: transparent;border: 0px solid transparent}")
- table.setColumnCount(2)
- table.setRowCount(3)
- table.setEnabled(False)
- table.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
- table.setShowGrid(False)
- table.setHorizontalHeaderLabels([_("Status"), _("Version")])
- table.setColumnWidth(1, 500)
- table.verticalHeader().setFixedWidth(100)
- table.setVerticalHeaderLabels(["Winget ", "Scoop ", "GSudo "])
- table.setItem(0, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["wingetFound"] else _("Not found")))
- table.setItem(0, 1, QTableWidgetItem(" "+str(globals.componentStatus["wingetVersion"])))
- table.setItem(1, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["scoopFound"] else _("Not found")))
- table.setItem(1, 1, QTableWidgetItem(" "+str(globals.componentStatus["scoopVersion"])))
- table.setItem(2, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["sudoFound"] else _("Not found")))
- table.setItem(2, 1, QTableWidgetItem(" "+str(globals.componentStatus["sudoVersion"])))
- table.horizontalHeaderItem(0).setTextAlignment(Qt.AlignLeft)
- table.setRowHeight(0, 35)
- table.setRowHeight(1, 35)
- table.setRowHeight(2, 35)
- table.horizontalHeaderItem(1).setTextAlignment(Qt.AlignLeft)
- table.verticalHeaderItem(0).setTextAlignment(Qt.AlignRight)
- table.verticalHeaderItem(1).setTextAlignment(Qt.AlignRight)
- table.verticalHeaderItem(2).setTextAlignment(Qt.AlignRight)
- table.setCornerWidget(QLabel(""))
- table.setCornerButtonEnabled(False)
- table.setFixedHeight(150)
- table.cornerWidget().setStyleSheet("background: transparent;")
- self.layout.addWidget(table)
- title = QLabel(_("About WingetUI version {0}").format(versionName))
- title.setStyleSheet(f"font-size: 30pt;font-family: \"{globals.dispfont}\";font-weight: bold;")
- self.layout.addWidget(title)
- self.layout.addSpacing(5)
- description = QLinkLabel(_("The main goal of this project is to create an intuitive UI to manage the most common CLI package managers for Windows, such as Winget and Scoop.")+"\n"+_("This project has no connection with the official {0} project — it's completely unofficial.").format(f"Winget"))
- self.layout.addWidget(description)
- self.layout.addSpacing(5)
- self.layout.addWidget(QLinkLabel(f"{_('Homepage')}: https://github.com/marticliment/WingetUI"))
- self.layout.addSpacing(30)
-
- self.layout.addWidget(QLinkLabel(f"{_('Contributors')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
- self.layout.addWidget(QLinkLabel(_("WingetUI wouldn't have been possible with the help of our dear contributors. Check out their GitHub profile, WingetUI wouldn't be possible without them!")))
- contributorsHTMLList = "
"
- self.layout.addWidget(QLinkLabel(contributorsHTMLList))
- self.layout.addSpacing(15)
-
- self.layout.addWidget(QLinkLabel(f"{_('Translators')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
- self.layout.addWidget(QLinkLabel(_("WingetUI has not been machine translated. The following users have been in charge of the translations:")))
- translatorsHTMLList = ""
- translatorList = []
- translatorData: dict[str, str] = {}
- for key, value in languageCredits.items():
- langName = languageReference[key] if (key in languageReference) else key
- for translator in value:
- link = translator.get("link")
- name = translator.get("name")
- translatorLine = name
- if (link):
- translatorLine = f"{name}"
- translatorKey = f"{name}{langName}" # for sort
- translatorList.append(translatorKey)
- translatorData[translatorKey] = f"{translatorLine} ({langName})"
- translatorList.sort(key=str.casefold)
- for translator in translatorList:
- translatorsHTMLList += f"- {translatorData[translator]}
"
- translatorsHTMLList += "
"
- translatorsHTMLList += _("Do you want to translate WingetUI to your language? See how to contribute HERE!").format(blueColor, "https://github.com/marticliment/WingetUI/wiki#translating-wingetui")
- self.layout.addWidget(QLinkLabel(translatorsHTMLList))
- self.layout.addSpacing(15)
-
- self.layout.addWidget(QLinkLabel(f"{_('About the dev')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
- self.layout.addWidget(QLinkLabel(_("Hi, my name is Martí, and i am the developer of WingetUI. WingetUI has been entirely made on my free time!")))
- self.layout.addWidget(QLinkLabel(_("Check out my {0} and my {1}!").format(f"{_('GitHub profile')}", f"{_('homepage')}")))
- self.layout.addWidget(QLinkLabel(_("Do you find WingetUI useful? You'd like to support the developer? If so, you can {0}, it helps a lot!").format(f"{_('buy me a coffee')}")))
-
- self.layout.addSpacing(15)
- self.layout.addWidget(QLinkLabel(f"{_('Licenses')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
- self.layout.addWidget(QLabel())
- self.layout.addWidget(QLinkLabel(f"WingetUI: LGPL v2.1: https://github.com/marticliment/WinGetUI/blob/main/LICENSE"))
- self.layout.addWidget(QLabel())
- self.layout.addWidget(QLinkLabel(f"PySide6: LGPLv3: https://www.gnu.org/licenses/lgpl-3.0.html"))
- self.layout.addWidget(QLinkLabel(f"Python3: {_('PSF License')}: https://docs.python.org/3/license.html#psf-license"))
- self.layout.addWidget(QLinkLabel(f"Pywin32: {_('PSF License')}: https://spdx.org/licenses/PSF-2.0.html"))
- self.layout.addWidget(QLinkLabel())
- self.layout.addWidget(QLinkLabel(f"Winget: {_('MIT License')}: https://github.com/microsoft/winget-cli/blob/master/LICENSE"))
- self.layout.addWidget(QLinkLabel(f"Scoop: {_('Unlicense')}: https://github.com/lukesampson/scoop/blob/master/LICENSE"))
- self.layout.addWidget(QLinkLabel(f"GSudo: {_('MIT License')}: https://github.com/gerardog/gsudo/blob/master/LICENSE.txt"))
- self.layout.addWidget(QLinkLabel())
- self.layout.addWidget(QLinkLabel(f"{_('Icons')}: {_('By Icons8')}: https://icons8.com"))
- self.layout.addWidget(QLinkLabel())
- self.layout.addWidget(QLinkLabel())
- button = QPushButton(_("About Qt6"))
- button.setFixedWidth(710)
- button.setFixedHeight(25)
- button.clicked.connect(lambda: MessageBox.aboutQt(self, _("WingetUI - About Qt6")))
- self.layout.addWidget(button)
- self.layout.addWidget(QLinkLabel())
- self.layout.addStretch()
-
+ try:
+ table = QTableWidget()
+ table.setAutoFillBackground(True)
+ table.setStyleSheet("*{border: 0px solid transparent; background-color: transparent;}QHeaderView{font-size: 13pt;padding: 0px;margin: 0px;}QTableCornerButton::section,QHeaderView,QHeaderView::section,QTableWidget,QWidget,QTableWidget::item{background-color: transparent;border: 0px solid transparent}")
+ table.setColumnCount(2)
+ table.setRowCount(3)
+ table.setEnabled(False)
+ table.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+ table.setShowGrid(False)
+ table.setHorizontalHeaderLabels([_("Status"), _("Version")])
+ table.setColumnWidth(1, 500)
+ table.verticalHeader().setFixedWidth(100)
+ table.setVerticalHeaderLabels(["Winget ", "Scoop ", "GSudo "])
+ table.setItem(0, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["wingetFound"] else _("Not found")))
+ table.setItem(0, 1, QTableWidgetItem(" "+str(globals.componentStatus["wingetVersion"])))
+ table.setItem(1, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["scoopFound"] else _("Not found")))
+ table.setItem(1, 1, QTableWidgetItem(" "+str(globals.componentStatus["scoopVersion"])))
+ table.setItem(2, 0, QTableWidgetItem(" "+_("Found") if globals.componentStatus["sudoFound"] else _("Not found")))
+ table.setItem(2, 1, QTableWidgetItem(" "+str(globals.componentStatus["sudoVersion"])))
+ table.horizontalHeaderItem(0).setTextAlignment(Qt.AlignLeft)
+ table.setRowHeight(0, 35)
+ table.setRowHeight(1, 35)
+ table.setRowHeight(2, 35)
+ table.horizontalHeaderItem(1).setTextAlignment(Qt.AlignLeft)
+ table.verticalHeaderItem(0).setTextAlignment(Qt.AlignRight)
+ table.verticalHeaderItem(1).setTextAlignment(Qt.AlignRight)
+ table.verticalHeaderItem(2).setTextAlignment(Qt.AlignRight)
+ table.setCornerWidget(QLabel(""))
+ table.setCornerButtonEnabled(False)
+ table.setFixedHeight(150)
+ table.cornerWidget().setStyleSheet("background: transparent;")
+ self.layout.addWidget(table)
+ title = QLabel(_("About WingetUI version {0}").format(versionName))
+ title.setStyleSheet(f"font-size: 30pt;font-family: \"{globals.dispfont}\";font-weight: bold;")
+ self.layout.addWidget(title)
+ self.layout.addSpacing(5)
+ description = QLinkLabel(_("The main goal of this project is to create an intuitive UI to manage the most common CLI package managers for Windows, such as Winget and Scoop.")+"\n"+_("This project has no connection with the official {0} project — it's completely unofficial.").format(f"Winget"))
+ self.layout.addWidget(description)
+ self.layout.addSpacing(5)
+ self.layout.addWidget(QLinkLabel(f"{_('Homepage')}: https://github.com/marticliment/WingetUI"))
+ self.layout.addSpacing(30)
+
+ self.layout.addWidget(QLinkLabel(f"{_('Contributors')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
+ self.layout.addWidget(QLinkLabel(_("WingetUI wouldn't have been possible with the help of our dear contributors. Check out their GitHub profile, WingetUI wouldn't be possible without them!")))
+ GHcontributors = ""
+ for user in (
+ "harleylara",
+ "MisterEvans78",
+ "neoOpus",
+ "panther7",
+ "ppvnf",
+ "RavenMacDaddy",
+ "Satanarious",
+ "sitiom",
+ "sklart",
+ "vedantmgoyal2009",
+ "victorelec14",
+ ):
+ GHcontributors += f"- {user}
"
+ GHcontributors += "
"
+ self.layout.addWidget(QLinkLabel(GHcontributors))
+ self.layout.addSpacing(15)
+
+ self.layout.addWidget(QLinkLabel(f"{_('Translators')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
+ self.layout.addWidget(QLinkLabel(_("WingetUI has not been machine translated. The following users have been in charge of the translations:")))
+ translators = ""
+ translatorList = []
+ for key in list(languageCredits.keys()):
+ for singleuser in languageCredits[key].split(","):
+ if singleuser != "":
+ translatorList.append(f"{singleuser.strip()} ({languageReference[key]})")
+ translatorList.sort(key=str.casefold)
+ for user in translatorList:
+ translators += f"- {user}
"
+ translators += "
"
+ translators += _("Do you want to translate WingetUI to your language? See how to contribute HERE!").format(blueColor, "https://github.com/marticliment/WingetUI/wiki#translating-wingetui")
+ self.layout.addWidget(QLinkLabel(translators))
+ self.layout.addSpacing(15)
+
+ self.layout.addWidget(QLinkLabel(f"{_('About the dev')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
+ self.layout.addWidget(QLinkLabel(_("Hi, my name is Martí, and i am the developer of WingetUI. WingetUI has been entirely made on my free time!")))
+ try:
+ self.layout.addWidget(QLinkLabel(_("Check out my {0} and my {1}!").format(f"{_('GitHub profile')}", f"{_('homepage')}")))
+ except Exception as e:
+ print(e)
+ print(blueColor)
+ print(_('homepage'))
+ print(_('GitHub profile'))
+ self.layout.addWidget(QLinkLabel(_("Do you find WingetUI useful? You'd like to support the developer? If so, you can {0}, it helps a lot!").format(f"{_('buy me a coffee')}")))
+
+ self.layout.addSpacing(15)
+ self.layout.addWidget(QLinkLabel(f"{_('Licenses')}:", f"font-size: 22pt;font-family: \"{globals.dispfont}\";font-weight: bold;"))
+ self.layout.addWidget(QLabel())
+ self.layout.addWidget(QLinkLabel(f"WingetUI: LGPL v2.1: https://github.com/marticliment/WinGetUI/blob/main/LICENSE"))
+ self.layout.addWidget(QLabel())
+ self.layout.addWidget(QLinkLabel(f"PySide6: LGPLv3: https://www.gnu.org/licenses/lgpl-3.0.html"))
+ self.layout.addWidget(QLinkLabel(f"Python3: {_('PSF License')}: https://docs.python.org/3/license.html#psf-license"))
+ self.layout.addWidget(QLinkLabel(f"Pywin32: {_('PSF License')}: https://spdx.org/licenses/PSF-2.0.html"))
+ self.layout.addWidget(QLinkLabel())
+ self.layout.addWidget(QLinkLabel(f"Winget: {_('MIT License')}: https://github.com/microsoft/winget-cli/blob/master/LICENSE"))
+ self.layout.addWidget(QLinkLabel(f"Scoop: {_('Unlicense')}: https://github.com/lukesampson/scoop/blob/master/LICENSE"))
+ self.layout.addWidget(QLinkLabel(f"GSudo: {_('MIT License')}: https://github.com/gerardog/gsudo/blob/master/LICENSE.txt"))
+ self.layout.addWidget(QLinkLabel())
+ self.layout.addWidget(QLinkLabel(f"{_('Icons')}: {_('By Icons8')}: https://icons8.com"))
+ self.layout.addWidget(QLinkLabel())
+ self.layout.addWidget(QLinkLabel())
+ button = QPushButton(_("About Qt6"))
+ button.setFixedWidth(710)
+ button.setFixedHeight(25)
+ button.clicked.connect(lambda: MessageBox.aboutQt(self, _("WingetUI - About Qt6")))
+ self.layout.addWidget(button)
+ self.layout.addWidget(QLinkLabel())
+ self.layout.addStretch()
+ except Exception as e:
+ self.layout.addWidget(QLabel("An error occurred while loading the about section"))
+ self.layout.addWidget(QLabel(str(e)))
print("🟢 About tab loaded!")
def showEvent(self, event: QShowEvent) -> None:
@@ -2126,7 +2138,7 @@ def changeLang():
selectedLang = invertedLangDict[self.language.combobox.currentText()] # list(languageReference.keys())[i]
cprint(invertedLangDict[self.language.combobox.currentText()])
self.language.toggleRestartButton(selectedLang != langName)
- setSettingsValue("PreferredLanguage", selectedLang, r=False)
+ setSettingsValue("PreferredLanguage", selectedLang)
def restartElevenClockByLangChange():
subprocess.run(str("start /B \"\" \""+sys.executable)+"\"", shell=True)