diff options
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/MainWindow.cpp | 27 | ||||
-rw-r--r-- | launcher/ui/MainWindow.h | 2 | ||||
-rw-r--r-- | launcher/ui/dialogs/AboutDialog.cpp | 7 | ||||
-rw-r--r-- | launcher/ui/pages/global/AccountListPage.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/pages/instance/LogPage.cpp | 6 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/ImportPage.ui | 2 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/ModModel.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/flame/FlamePage.ui | 2 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/setupwizard/LanguageWizardPage.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/setupwizard/SetupWizard.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/widgets/JavaSettingsWidget.cpp | 2 |
13 files changed, 39 insertions, 21 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 124de8e3..12a3cb2e 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -161,7 +161,7 @@ public: QString result; result = QApplication::translate("MainWindow", m_text); if(result.contains("%1")) { - result = result.arg(BuildConfig.LAUNCHER_NAME); + result = result.arg(BuildConfig.LAUNCHER_DISPLAYNAME); } m_contained->setText(result); } @@ -170,7 +170,7 @@ public: QString result; result = QApplication::translate("MainWindow", m_tooltip); if(result.contains("%1")) { - result = result.arg(BuildConfig.LAUNCHER_NAME); + result = result.arg(BuildConfig.LAUNCHER_DISPLAYNAME); } m_contained->setToolTip(result); } @@ -258,6 +258,7 @@ public: QMenu * helpMenu = nullptr; TranslatedToolButton helpMenuButton; + TranslatedAction actionClearMetadata; TranslatedAction actionReportBug; TranslatedAction actionDISCORD; TranslatedAction actionMATRIX; @@ -347,6 +348,13 @@ public: actionUndoTrashInstance->setShortcut(QKeySequence("Ctrl+Z")); all_actions.append(&actionUndoTrashInstance); + actionClearMetadata = TranslatedAction(MainWindow); + actionClearMetadata->setObjectName(QStringLiteral("actionClearMetadata")); + actionClearMetadata->setIcon(APPLICATION->getThemedIcon("refresh")); + actionClearMetadata.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Clear Metadata Cache")); + actionClearMetadata.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Clear cached metadata")); + all_actions.append(&actionClearMetadata); + if (!BuildConfig.BUG_TRACKER_URL.isEmpty()) { actionReportBug = TranslatedAction(MainWindow); actionReportBug->setObjectName(QStringLiteral("actionReportBug")); @@ -445,6 +453,8 @@ public: helpMenu = new QMenu(MainWindow); helpMenu->setToolTipsVisible(true); + helpMenu->addAction(actionClearMetadata); + if (!BuildConfig.BUG_TRACKER_URL.isEmpty()) { helpMenu->addAction(actionReportBug); } @@ -537,6 +547,8 @@ public: helpMenu = menuBar->addMenu(tr("&Help")); helpMenu->setSeparatorsCollapsible(false); + helpMenu->addAction(actionClearMetadata); + helpMenu->addSeparator(); helpMenu->addAction(actionAbout); helpMenu->addAction(actionOpenWiki); helpMenu->addAction(actionNewsMenuBar); @@ -829,7 +841,7 @@ public: MainWindow->setWindowIcon(APPLICATION->getThemedIcon("logo")); MainWindow->setWindowTitle(APPLICATION->applicationDisplayName()); #ifndef QT_NO_ACCESSIBILITY - MainWindow->setAccessibleName(BuildConfig.LAUNCHER_NAME); + MainWindow->setAccessibleName(BuildConfig.LAUNCHER_DISPLAYNAME); #endif createMainToolbarActions(MainWindow); @@ -1146,7 +1158,7 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos) { auto group = view->groupNameAt(pos); - QAction *actionVoid = new QAction(BuildConfig.LAUNCHER_NAME, this); + QAction *actionVoid = new QAction(BuildConfig.LAUNCHER_DISPLAYNAME, this); actionVoid->setEnabled(false); QAction *actionCreateInstance = new QAction(tr("Create instance"), this); @@ -1967,6 +1979,11 @@ void MainWindow::on_actionReportBug_triggered() DesktopServices::openUrl(QUrl(BuildConfig.BUG_TRACKER_URL)); } +void MainWindow::on_actionClearMetadata_triggered() +{ + APPLICATION->metacache()->evictAll(); +} + void MainWindow::on_actionOpenWiki_triggered() { DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg(""))); @@ -2239,7 +2256,7 @@ void MainWindow::checkInstancePathForProblems() "You have now two options: <br/>" " - change the instance folder in the settings <br/>" " - move this installation of %1 to a different folder" - ).arg(BuildConfig.LAUNCHER_NAME) + ).arg(BuildConfig.LAUNCHER_DISPLAYNAME) ); warning.setDefaultButton(QMessageBox::Ok); warning.exec(); diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index 8b41bf94..d01f0448 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -130,6 +130,8 @@ private slots: void on_actionReportBug_triggered(); + void on_actionClearMetadata_triggered(); + void on_actionOpenWiki_triggered(); void on_actionMoreNews_triggered(); diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp index 743c34f1..47f204b3 100644 --- a/launcher/ui/dialogs/AboutDialog.cpp +++ b/launcher/ui/dialogs/AboutDialog.cpp @@ -70,8 +70,7 @@ QString getCreditsHtml() stream << "<center>\n"; //: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Developers" - stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_NAME) << "</h3>\n"; - stream << QString("<p>LennyMcLennington %1</p>\n") .arg(getGitHub("LennyMcLennington")); + stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n"; stream << QString("<p>Sefa Eyeoglu (Scrumplex) %1</p>\n") .arg(getWebsite("https://scrumplex.net")); stream << QString("<p>dada513 %1</p>\n") .arg(getGitHub("dada513")); stream << QString("<p>txtsd %1</p>\n") .arg(getGitHub("txtsd")); @@ -81,7 +80,7 @@ QString getCreditsHtml() stream << "<br />\n"; //: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Contributors" - stream << "<h3>" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_NAME) << "</h3>\n"; + stream << "<h3>" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n"; stream << QString("<p>DioEgizio %1</p>\n") .arg(getGitHub("DioEgizio")); stream << QString("<p>flowln %1</p>\n") .arg(getGitHub("flowln")); stream << QString("<p>swirl %1</p>\n") .arg(getWebsite("https://swurl.xyz/")); @@ -125,7 +124,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia { ui->setupUi(this); - QString launcherName = BuildConfig.LAUNCHER_NAME; + QString launcherName = BuildConfig.LAUNCHER_DISPLAYNAME; setWindowTitle(tr("About %1").arg(launcherName)); diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp index a4f4dfb9..278f45c4 100644 --- a/launcher/ui/pages/global/AccountListPage.cpp +++ b/launcher/ui/pages/global/AccountListPage.cpp @@ -167,7 +167,7 @@ void AccountListPage::on_actionAddMicrosoft_triggered() tr( "Microsoft accounts are only usable on macOS 10.13 or newer, with fully updated %1.\n\n" "Please update both your operating system and %1." - ).arg(BuildConfig.LAUNCHER_NAME), + ).arg(BuildConfig.LAUNCHER_DISPLAYNAME), QMessageBox::Warning )->exec(); return; diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index 73ef0024..1e5df5b2 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -151,7 +151,7 @@ void LauncherPage::on_instDirBrowseBtn_clicked() "This is known to cause problems. " "After a restart the launcher might break, " "because it will no longer have access to that directory.\n\n" - "Granting PolyMC access to it via Flatseal is recommended.")); + "Granting %1 access to it via Flatseal is recommended.").arg(BuildConfig.LAUNCHER_DISPLAYNAME)); warning.setInformativeText( tr("Do you want to proceed anyway?")); warning.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); diff --git a/launcher/ui/pages/instance/LogPage.cpp b/launcher/ui/pages/instance/LogPage.cpp index 3d9fb025..31c3e925 100644 --- a/launcher/ui/pages/instance/LogPage.cpp +++ b/launcher/ui/pages/instance/LogPage.cpp @@ -279,7 +279,7 @@ void LogPage::on_btnPaste_clicked() MessageLevel::Launcher, QString("%2: Log upload triggered at: %1").arg( QDateTime::currentDateTime().toString(Qt::RFC2822Date), - BuildConfig.LAUNCHER_NAME + BuildConfig.LAUNCHER_DISPLAYNAME ) ); auto url = GuiUtil::uploadPaste(m_model->toPlainText(), this); @@ -289,7 +289,7 @@ void LogPage::on_btnPaste_clicked() MessageLevel::Launcher, QString("%2: Log uploaded to: %1").arg( url, - BuildConfig.LAUNCHER_NAME + BuildConfig.LAUNCHER_DISPLAYNAME ) ); } @@ -297,7 +297,7 @@ void LogPage::on_btnPaste_clicked() { m_model->append( MessageLevel::Error, - QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_NAME) + QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_DISPLAYNAME) ); } } diff --git a/launcher/ui/pages/modplatform/ImportPage.ui b/launcher/ui/pages/modplatform/ImportPage.ui index 0a50e871..3583cf90 100644 --- a/launcher/ui/pages/modplatform/ImportPage.ui +++ b/launcher/ui/pages/modplatform/ImportPage.ui @@ -60,7 +60,7 @@ <item> <widget class="QLabel" name="label_2"> <property name="text"> - <string>- PolyMC / MultiMC exported instances (ZIP)</string> + <string>- Prism Launcher, PolyMC or MultiMC exported instances (ZIP)</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> diff --git a/launcher/ui/pages/modplatform/ModModel.cpp b/launcher/ui/pages/modplatform/ModModel.cpp index 8961fadd..49766fa6 100644 --- a/launcher/ui/pages/modplatform/ModModel.cpp +++ b/launcher/ui/pages/modplatform/ModModel.cpp @@ -265,7 +265,7 @@ void ListModel::searchRequestFailed(QString reason) //: %1 refers to the launcher itself QString("%1 %2") .arg(m_parent->displayName()) - .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME))); + .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME))); } jobPtr.reset(); diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.ui b/launcher/ui/pages/modplatform/flame/FlamePage.ui index aab16421..1a3d0225 100644 --- a/launcher/ui/pages/modplatform/flame/FlamePage.ui +++ b/launcher/ui/pages/modplatform/flame/FlamePage.ui @@ -19,7 +19,7 @@ </font> </property> <property name="text"> - <string>Note: CurseForge allows creators to block access to third-party tools like PolyMC. As such, you may need to manually download some mods to be able to install a modpack.</string> + <string>Note: CurseForge allows creators to block access to third-party tools like Prism Launcher. As such, you may need to manually download some mods to be able to install a modpack.</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp index fd7a3537..43fda9de 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp @@ -321,7 +321,7 @@ void ModpackListModel::searchRequestFailed(QString reason) //: %1 refers to the launcher itself QString("%1 %2") .arg(m_parent->displayName()) - .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME))); + .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME))); } jobPtr.reset(); diff --git a/launcher/ui/setupwizard/LanguageWizardPage.cpp b/launcher/ui/setupwizard/LanguageWizardPage.cpp index 072df10d..6bd19b6f 100644 --- a/launcher/ui/setupwizard/LanguageWizardPage.cpp +++ b/launcher/ui/setupwizard/LanguageWizardPage.cpp @@ -44,6 +44,6 @@ bool LanguageWizardPage::validatePage() void LanguageWizardPage::retranslate() { setTitle(tr("Language")); - setSubTitle(tr("Select the language to use in %1").arg(BuildConfig.LAUNCHER_NAME)); + setSubTitle(tr("Select the language to use in %1").arg(BuildConfig.LAUNCHER_DISPLAYNAME)); mainWidget->retranslate(); } diff --git a/launcher/ui/setupwizard/SetupWizard.cpp b/launcher/ui/setupwizard/SetupWizard.cpp index 22eab60e..3c8b5d39 100644 --- a/launcher/ui/setupwizard/SetupWizard.cpp +++ b/launcher/ui/setupwizard/SetupWizard.cpp @@ -29,7 +29,7 @@ void SetupWizard::retranslate() setButtonText(QWizard::BackButton, tr("< &Back")); setButtonText(QWizard::FinishButton, tr("&Finish")); setButtonText(QWizard::CustomButton1, tr("&Refresh")); - setWindowTitle(tr("%1 Quick Setup").arg(BuildConfig.LAUNCHER_NAME)); + setWindowTitle(tr("%1 Quick Setup").arg(BuildConfig.LAUNCHER_DISPLAYNAME)); } BaseWizardPage * SetupWizard::getBasePage(int id) diff --git a/launcher/ui/widgets/JavaSettingsWidget.cpp b/launcher/ui/widgets/JavaSettingsWidget.cpp index f0765909..314a126e 100644 --- a/launcher/ui/widgets/JavaSettingsWidget.cpp +++ b/launcher/ui/widgets/JavaSettingsWidget.cpp @@ -159,7 +159,7 @@ JavaSettingsWidget::ValidationStatus JavaSettingsWidget::validate() "Do you wish to proceed without any Java?" "\n\n" "You can change the Java version in the settings later.\n" - ).arg(BuildConfig.LAUNCHER_NAME), + ).arg(BuildConfig.LAUNCHER_DISPLAYNAME), QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::NoButton |