diff options
| author | Petr Mrázek <peterix@gmail.com> | 2021-10-18 00:47:02 +0200 |
|---|---|---|
| committer | Petr Mrázek <peterix@gmail.com> | 2021-10-21 00:47:53 +0200 |
| commit | 5b3dffce62f7e4c00436adeca33c5f2fc4a21db4 (patch) | |
| tree | 01a0eb2d994a9b0622697a6dbb124966692e692a /launcher | |
| parent | 297d4b4196c9bd1d9c4dd422dd88aaec620038d6 (diff) | |
| download | PrismLauncher-5b3dffce62f7e4c00436adeca33c5f2fc4a21db4.tar.gz PrismLauncher-5b3dffce62f7e4c00436adeca33c5f2fc4a21db4.tar.bz2 PrismLauncher-5b3dffce62f7e4c00436adeca33c5f2fc4a21db4.zip | |
NOISSUE continue debranding...
Diffstat (limited to 'launcher')
40 files changed, 209 insertions, 159 deletions
diff --git a/launcher/BaseInstance.cpp b/launcher/BaseInstance.cpp index 46b45827..374d4a29 100644 --- a/launcher/BaseInstance.cpp +++ b/launcher/BaseInstance.cpp @@ -25,6 +25,7 @@ #include "FileSystem.h" #include "Commandline.h" +#include "BuildConfig.h" BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir) : QObject() @@ -260,7 +261,7 @@ QString BaseInstance::name() const QString BaseInstance::windowTitle() const { - return "MultiMC: " + name().replace(QRegExp("[ \n\r\t]+"), " "); + return BuildConfig.LAUNCHER_NAME + ": " + name().replace(QRegExp("[ \n\r\t]+"), " "); } // FIXME: why is this here? move it to MinecraftInstance!!! diff --git a/launcher/BaseInstance.h b/launcher/BaseInstance.h index 51258933..253d2130 100644 --- a/launcher/BaseInstance.h +++ b/launcher/BaseInstance.h @@ -71,7 +71,7 @@ public: virtual void saveNow() = 0; /*** - * the instance has been invalidated - it is no longer tracked by MultiMC for some reason, + * the instance has been invalidated - it is no longer tracked by the launcher for some reason, * but it has not necessarily been deleted. * * Happens when the instance folder changes to some other location, or the instance is removed by external means. diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index eb49b6d9..5c45273b 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -555,7 +555,7 @@ set(LOGIC_SOURCES ${ATLAUNCHER_SOURCES} ) -SET(MULTIMC_SOURCES +SET(LAUNCHER_SOURCES # Application base Launcher.h Launcher.cpp @@ -812,7 +812,7 @@ SET(MULTIMC_SOURCES ) ######## UIs ######## -SET(MULTIMC_UIS +SET(LAUNCHER_UIS # Instance pages pages/instance/GameOptionsPage.ui pages/instance/VersionPage.ui @@ -868,7 +868,7 @@ SET(MULTIMC_UIS widgets/MCModInfoFrame.ui ) -set(MULTIMC_QRCS +set(LAUNCHER_QRCS resources/backgrounds/backgrounds.qrc resources/multimc/multimc.qrc resources/pe_dark/pe_dark.qrc @@ -879,19 +879,20 @@ set(MULTIMC_QRCS resources/iOS/iOS.qrc resources/flat/flat.qrc resources/documents/documents.qrc + ../${Launcher_Branding_LogoQRC} ) ######## Windows resource files ######## if(WIN32) - set(MULTIMC_RCS ../${Launcher_Branding_WindowsRC}) + set(LAUNCHER_RCS ../${Launcher_Branding_WindowsRC}) endif() # Qt 5 stuff -qt5_wrap_ui(MULTIMC_UI ${MULTIMC_UIS}) -qt5_add_resources(MULTIMC_RESOURCES ${MULTIMC_QRCS}) +qt5_wrap_ui(LAUNCHER_UI ${LAUNCHER_UIS}) +qt5_add_resources(LAUNCHER_RESOURCES ${LAUNCHER_QRCS}) # Add executable -add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_RESOURCES}) +add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES} ${LAUNCHER_UI} ${LAUNCHER_RESOURCES}) target_link_libraries(Launcher_logic systeminfo Launcher_quazip @@ -921,7 +922,7 @@ target_link_libraries(Launcher_logic target_link_libraries(Launcher_logic secrets) -add_executable(${Launcher_Name} MACOSX_BUNDLE WIN32 main.cpp ${MULTIMC_RCS}) +add_executable(${Launcher_Name} MACOSX_BUNDLE WIN32 main.cpp ${LAUNCHER_RCS}) target_link_libraries(${Launcher_Name} Launcher_logic) if(DEFINED Launcher_APP_BINARY_NAME) diff --git a/launcher/ColorCache.h b/launcher/ColorCache.h index 6ae633b9..a840664d 100644 --- a/launcher/ColorCache.h +++ b/launcher/ColorCache.h @@ -91,7 +91,7 @@ public: LogColorCache(QColor front, QColor back) : ColorCache(front, back, 1.0) { - addColor((int)MessageLevel::MultiMC, QColor("purple")); + addColor((int)MessageLevel::Launcher, QColor("purple")); addColor((int)MessageLevel::Debug, QColor("green")); addColor((int)MessageLevel::Warning, QColor("orange")); addColor((int)MessageLevel::Error, QColor("red")); diff --git a/launcher/FileSystem_test.cpp b/launcher/FileSystem_test.cpp index df653ea1..90ddc499 100644 --- a/launcher/FileSystem_test.cpp +++ b/launcher/FileSystem_test.cpp @@ -135,7 +135,7 @@ slots: << "asdf" << QString() #if defined(Q_OS_LINUX) - << MULTIMC_GET_TEST_FILE("data/FileSystem-test_createShortcut-unix") + << GET_TEST_FILE("data/FileSystem-test_createShortcut-unix") #elif defined(Q_OS_WIN) << QByteArray() #endif diff --git a/launcher/InstanceList.cpp b/launcher/InstanceList.cpp index 42b2ae1a..ae905414 100644 --- a/launcher/InstanceList.cpp +++ b/launcher/InstanceList.cpp @@ -259,7 +259,7 @@ void InstanceList::deleteInstance(const InstanceId& id) return; } - qDebug() << "Instance" << id << "has been deleted by MultiMC."; + qDebug() << "Instance" << id << "has been deleted by the launcher."; } static QMap<InstanceId, InstanceLocator> getIdMapping(const QList<InstancePtr> &list) @@ -799,7 +799,7 @@ private slots: private: /* * WHY: the whole reason why this uses an exponential backoff retry scheme is antivirus on Windows. - * Basically, it starts messing things up while MultiMC is extracting/creating instances + * Basically, it starts messing things up while the launcher is extracting/creating instances * and causes that horrible failure that is NTFS to lock files in place because they are open. */ ExponentialSeries backoff; diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index 15972923..a865caab 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -47,7 +47,7 @@ void LaunchController::login() { m_parentWidget, tr("No Accounts"), tr("In order to play Minecraft, you must have at least one Mojang or Minecraft " - "account logged in to MultiMC." + "account logged in." "Would you like to open the account manager to add an account now?"), QMessageBox::Information, QMessageBox::Yes | QMessageBox::No @@ -286,7 +286,7 @@ void LaunchController::launchInstance() } resolved_servers = resolved_servers + "]\n\n"; } - m_launcher->prependStep(new TextPrint(m_launcher.get(), resolved_servers, MessageLevel::MultiMC)); + m_launcher->prependStep(new TextPrint(m_launcher.get(), resolved_servers, MessageLevel::Launcher)); } else { online_mode = "offline"; } @@ -298,10 +298,10 @@ void LaunchController::launchInstance() auth_server_status = "offline"; } - m_launcher->prependStep(new TextPrint(m_launcher.get(), "Launched instance in " + online_mode + " mode\nAuthentication server is " + auth_server_status + "\n", MessageLevel::MultiMC)); + m_launcher->prependStep(new TextPrint(m_launcher.get(), "Launched instance in " + online_mode + " mode\nAuthentication server is " + auth_server_status + "\n", MessageLevel::Launcher)); // Prepend Version - m_launcher->prependStep(new TextPrint(m_launcher.get(), "MultiMC version: " + BuildConfig.printableVersionString() + "\n\n", MessageLevel::MultiMC)); + m_launcher->prependStep(new TextPrint(m_launcher.get(), BuildConfig.LAUNCHER_NAME + " version: " + BuildConfig.printableVersionString() + "\n\n", MessageLevel::Launcher)); m_launcher->start(); } diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp index ab74a324..9a1d1ca3 100644 --- a/launcher/Launcher.cpp +++ b/launcher/Launcher.cpp @@ -87,7 +87,7 @@ static const QLatin1String liveCheckFile("live.check"); using namespace Commandline; -#define MACOS_HINT "If you are on macOS Sierra, you might have to move MultiMC.app to your /Applications or ~/Applications folder. "\ +#define MACOS_HINT "If you are on macOS Sierra, you might have to move the app to your /Applications or ~/Applications folder. "\ "This usually fixes the problem and you can move the application elsewhere afterwards.\n"\ "\n" @@ -179,10 +179,10 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) consoleAttached = true; } #endif - setOrganizationName("MultiMC"); - setOrganizationDomain("multimc.org"); - setApplicationName("MultiMC5"); - setApplicationDisplayName("MultiMC 5"); + setOrganizationName(BuildConfig.LAUNCHER_NAME); + setOrganizationDomain(BuildConfig.LAUNCHER_DOMAIN); + setApplicationName(BuildConfig.LAUNCHER_NAME); + setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME); setApplicationVersion(BuildConfig.printableVersionString()); startTime = QDateTime::currentDateTime(); @@ -200,7 +200,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) showFatalErrorMessage( "Unsupported system detected!", "Linux-on-Windows distributions are not supported.\n\n" - "Please use the Windows MultiMC binary when playing on Windows." + "Please use the Windows binary when playing on Windows." ); return; } @@ -227,7 +227,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) // --dir parser.addOption("dir"); parser.addShortOpt("dir", 'd'); - parser.addDocumentation("dir", "Use the supplied folder as MultiMC root instead of " + parser.addDocumentation("dir", "Use the supplied folder as application root instead of " "the binary location (use '.' for current)"); // --launch parser.addOption("launch"); @@ -240,7 +240,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) "(only valid in combination with --launch)"); // --alive parser.addSwitch("alive"); - parser.addDocumentation("alive", "Write a small '" + liveCheckFile + "' file after MultiMC starts"); + parser.addDocumentation("alive", "Write a small '" + liveCheckFile + "' file after the launcher starts"); // --import parser.addOption("import"); parser.addShortOpt("import", 'I'); @@ -255,7 +255,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) { std::cerr << "CommandLineError: " << e.what() << std::endl; if(argc > 0) - std::cerr << "Try '" << argv[0] << " -h' to get help on MultiMC's command line parameters." + std::cerr << "Try '" << argv[0] << " -h' to get help on command line parameters." << std::endl; m_status = Launcher::Failed; return; @@ -298,13 +298,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) } else { -#ifdef MULTIMC_LINUX_DATADIR - QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME")); - if (xdgDataHome.isEmpty()) - xdgDataHome = QDir::homePath() + QLatin1String("/.local/share"); - dataPath = xdgDataHome + "/multimc"; - adjustedBy += "XDG standard " + dataPath; -#elif defined(Q_OS_MAC) +#if defined(Q_OS_MAC) QDir foo(FS::PathCombine(applicationDirPath(), "../../Data")); dataPath = foo.absolutePath(); adjustedBy += "Fallback to special Mac location " + dataPath; @@ -317,30 +311,30 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) if (!FS::ensureFolderPathExists(dataPath)) { showFatalErrorMessage( - "MultiMC data folder could not be created.", - "MultiMC data folder could not be created.\n" + "The launcher data folder could not be created.", + "The launcher data folder could not be created.\n" "\n" #if defined(Q_OS_MAC) MACOS_HINT #endif - "Make sure you have the right permissions to the MultiMC data folder and any folder needed to access it.\n" + "Make sure you have the right permissions to the launcher data folder and any folder needed to access it.\n" "\n" - "MultiMC cannot continue until you fix this problem." + "The launcher cannot continue until you fix this problem." ); return; } if (!QDir::setCurrent(dataPath)) { showFatalErrorMessage( - "MultiMC data folder could not be opened.", - "MultiMC data folder could not be opened.\n" + "The launcher data folder could not be opened.", + "The launcher data folder could not be opened.\n" "\n" #if defined(Q_OS_MAC) MACOS_HINT #endif - "Make sure you have the right permissions to the MultiMC data folder.\n" + "Make sure you have the right permissions to the launcher data folder.\n" "\n" - "MultiMC cannot continue until you fix this problem." + "The launcher cannot continue until you fix this problem." ); return; } @@ -357,18 +351,24 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) QDir fi(applicationDirPath()); QString originalData = fi.absolutePath(); // if the config file exists in Contents/MacOS, then user data is still there and needs to moved - if (QFileInfo::exists(FS::PathCombine(originalData, "multimc.cfg"))) + if (QFileInfo::exists(FS::PathCombine(originalData, BuildConfig.LAUNCHER_CONFIGFILE))) { if (!QFileInfo::exists(FS::PathCombine(originalData, "dontmovemacdata"))) { QMessageBox::StandardButton askMoveDialogue; - askMoveDialogue = QMessageBox::question(nullptr, "MultiMC 5", "Would you like to move application data to a new data location? It will improve MultiMC's performance, but if you switch to older versions it will look like instances have disappeared. If you select no, you can migrate later in settings. You should select yes unless you're commonly switching between different versions of MultiMC (eg. develop and stable).", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); + askMoveDialogue = QMessageBox::question( + nullptr, + BuildConfig.LAUNCHER_DISPLAYNAME, + "Would you like to move application data to a new data location? It will improve the launcher's performance, but if you switch to older versions it will look like instances have disappeared. If you select no, you can migrate later in settings. You should select yes unless you're commonly switching between different versions (eg. develop and stable).", + QMessageBox::Yes | QMessageBox::No, + QMessageBox::Yes + ); if (askMoveDialogue == QMessageBox::Yes) { qDebug() << "On macOS and found config file in old location, moving user data..."; QDir dir; QStringList dataFiles { - "*.log", // MultiMC-@.log + "*.log", // Launcher log files: ${Launcher_Name}-@.log "accounts.json", "accounts", "assets", @@ -379,7 +379,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) "meta", "metacache", "mods", - "multimc.cfg", + BuildConfig.LAUNCHER_CONFIGFILE, "themes", "translations" }; @@ -451,7 +451,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) // init the logger { - static const QString logBase = "MultiMC-%0.log"; + static const QString logBase = BuildConfig.LAUNCHER_NAME + "-%0.log"; auto moveFile = [](const QString &oldName, const QString &newName) { QFile::remove(newName); @@ -468,15 +468,15 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) if(!logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) { showFatalErrorMessage( - "MultiMC data folder is not writable!", - "MultiMC couldn't create a log file - the MultiMC data folder is not writable.\n" + "The launcher data folder is not writable!", + "The launcher couldn't create a log file - the data folder is not writable.\n" "\n" #if defined(Q_OS_MAC) MACOS_HINT #endif - "Make sure you have write permissions to the MultiMC data folder.\n" + "Make sure you have write permissions to the data folder.\n" "\n" - "MultiMC cannot continue until you fix this problem." + "The launcher cannot continue until you fix this problem." ); return; } @@ -503,7 +503,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) ENV.setJarsPath( TOSTRING(MULTIMC_JARS_LOCATION) ); #endif - qDebug() << "MultiMC 5, (c) 2013-2021 MultiMC Contributors"; + qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT; qDebug() << "Version : " << BuildConfig.printableVersionString(); qDebug() << "Git commit : " << BuildConfig.GIT_COMMIT; qDebug() << "Git refspec : " << BuildConfig.GIT_REFSPEC; @@ -553,7 +553,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv) // Initialize application settings { - m_settings.reset(new INISettingsObject("multimc.cfg", this)); + m_settings.reset(new INISettingsObject(BuildConfig.LAUNCHER_CONFIGFILE, this)); // Updates m_settings->registerSetting("UpdateChannel", BuildConfig.VERSION_CHANNEL); m_settings->registerSetting("AutoUpdate", true); @@ -1164,6 +1164,9 @@ void Launcher::setIconTheme(const QString& name) QIcon Launcher::getThemedIcon(const QString& name) { + if(name == "logo") { + return QIcon(":/logo.svg"); + } return XdgIcon::fromTheme(name); } diff --git a/launcher/Launcher.h b/launcher/Launcher.h index 468f8a68..f4a20122 100644 --- a/launcher/Launcher.h +++ b/launcher/Launcher.h @@ -221,7 +221,7 @@ private: // main window, if any MainWindow * m_mainWindow = nullptr; - // peer MultiMC instance connector - used to implement single instance MultiMC and signalling + // peer launcher instance connector - used to implement single instance launcher and signalling LocalPeer * m_peerInstance = nullptr; GAnalytics * m_analytics = nullptr; diff --git a/launcher/LoggedProcess.cpp b/launcher/LoggedProcess.cpp index 822c0f04..2479f4ff 100644 --- a/launcher/LoggedProcess.cpp +++ b/launcher/LoggedProcess.cpp @@ -65,16 +65,16 @@ void LoggedProcess::on_exit(int exit_code, QProcess::ExitStatus status) if (status == QProcess::NormalExit) { //: Message displayed on instance exit - emit log({tr("Process exited with code %1.").arg(exit_code)}, MessageLevel::MultiMC); + emit log({tr("Process exited with code %1.").arg(exit_code)}, MessageLevel::Launcher); changeState(LoggedProcess::Finished); } else { //: Message displayed on instance crashed if(exit_code == -1) - emit log({tr("Process crashed.")}, MessageLevel::MultiMC); + emit log({tr("Process crashed.")}, MessageLevel::Launcher); else - emit log({tr("Process crashed with exitcode %1.").arg(exit_code)}, MessageLevel::MultiMC); + emit log({tr("Process crashed with exitcode %1.").arg(exit_code)}, MessageLevel::Launcher); changeState(LoggedProcess::Crashed); } } diff --git a/launcher/MainWindow.cpp b/launcher/MainWindow.cpp index 91cf203a..c3cc6b8d 100644 --- a/launcher/MainWindow.cpp +++ b/launcher/MainWindow.cpp @@ -133,11 +133,21 @@ public: { if(m_text) { - m_contained->setText(QApplication::translate("MainWindow", m_text)); + QString result; + result = QApplication::translate("MainWindow", m_text); + if(result.contains("%1")) { + result = result.arg(BuildConfig.LAUNCHER_NAME); + } + m_contained->setText(result); } if(m_tooltip) { - m_contained->setToolTip(QApplication::translate("MainWindow", m_tooltip)); + QString result; + result = QApplication::translate("MainWindow", m_tooltip); + if(result.contains("%1")) { + result = result.arg(BuildConfig.LAUNCHER_NAME); + } + m_contained->setToolTip(result); } } private: @@ -324,7 +334,7 @@ public: actionReportBug->setObjectName(QStringLiteral("actionReportBug")); actionReportBug->setIcon(LAUNCHER->getThemedIcon("bug")); actionReportBug.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Report a Bug")); - actionReportBug.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the bug tracker to report a bug with MultiMC.")); + actionReportBug.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the bug tracker to report a bug with %1.")); all_actions.append(&actionReportBug); helpMenu->addAction(actionReportBug); } @@ -334,7 +344,7 @@ public: actionDISCORD->setObjectName(QStringLiteral("actionDISCORD")); actionDISCORD->setIcon(LAUNCHER->getThemedIcon("discord")); actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord")); - actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open MultiMC discord voice chat.")); + actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 discord voice chat.")); all_actions.append(&actionDISCORD); helpMenu->addAction(actionDISCORD); } @@ -344,7 +354,7 @@ public: actionREDDIT->setObjectName(QStringLiteral("actionREDDIT")); actionREDDIT->setIcon(LAUNCHER->getThemedIcon("reddit-alien")); actionREDDIT.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Reddit")); - actionREDDIT.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open MultiMC subreddit.")); + actionREDDIT.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 subreddit.")); all_actions.append(&actionREDDIT); helpMenu->addAction(actionREDDIT); } @@ -353,14 +363,14 @@ public: actionAbout->setObjectName(QStringLiteral("actionAbout")); actionAbout->setIcon(LAUNCHER->getThemedIcon("about")); actionAbout->setMenuRole(QAction::AboutRole); - actionAbout.setTextId(QT_TRANSLATE_NOOP("MainWindow", "About MultiMC")); - actionAbout.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "View information about MultiMC.")); + actionAbout.setTextId(QT_TRANSLATE_NOOP("MainWindow", "About %1")); + actionAbout.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "View information about %1.")); all_actions.append(&actionAbout); helpMenu->addAction(actionAbout); helpMenuButton = TranslatedToolButton(MainWindow); helpMenuButton.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Help")); - helpMenuButton.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Get help with MultiMC or Minecraft.")); + helpMenuButton.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Get help with %1 or Minecraft.")); helpMenuButton->setMenu(helpMenu); helpMenuButton->setPopupMode(QToolButton::InstantPopup); helpMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -377,7 +387,7 @@ public: actionCheckUpdate->setObjectName(QStringLiteral("actionCheckUpdate")); actionCheckUpdate->setIcon(LAUNCHER->getThemedIcon("checkupdate")); actionCheckUpdate.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Update")); - actionCheckUpdate.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Check for new updates for MultiMC.")); + actionCheckUpdate.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Check for new updates for %1.")); all_actions.append(&actionCheckUpdate); mainToolBar->addAction(actionCheckUpdate); } @@ -387,8 +397,8 @@ public: actionPatreon = TranslatedAction(MainWindow); actionPatreon->setObjectName(QStringLiteral("actionPatreon")); actionPatreon->setIcon(LAUNCHER->getThemedIcon("patreon")); - actionPatreon.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Support MultiMC")); - actionPatreon.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the MultiMC Patreon page.")); + actionPatreon.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Support %1")); + actionPatreon.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 Patreon page.")); all_actions.append(&actionPatreon); mainToolBar->addAction(actionPatreon); @@ -437,7 +447,7 @@ public: actionMoreNews->setObjectName(QStringLiteral("actionMoreNews")); actionMoreNews->setIcon(LAUNCHER->getThemedIcon("news")); actionMoreNews.setTextId(QT_TRANSLATE_NOOP("MainWindow", "More news...")); - actionMoreNews.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the MultiMC development blog to read more news about MultiMC.")); + actionMoreNews.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the development blog to read more news about %1.")); all_actions.append(&actionMoreNews); newsToolBar->addAction(actionMoreNews); @@ -596,9 +606,9 @@ public: } MainWindow->resize(800, 600); MainWindow->setWindowIcon(LAUNCHER->getThemedIcon("logo")); - MainWindow->setWindowTitle("MultiMC 5"); + MainWindow->setWindowTitle(BuildConfig.LAUNCHER_DISPLAYNAME); #ifndef QT_NO_ACCESSIBILITY - MainWindow->setAccessibleName("MultiMC"); + MainWindow->setAccessibleName(BuildConfig.LAUNCHER_NAME); #endif createMainToolbar(MainWindow); @@ -623,7 +633,7 @@ public: void retranslateUi(QMainWindow *MainWindow) { - QString winTitle = tr("MultiMC 5 - Version %1").arg(BuildConfig.printableVersionString()); + QString winTitle = tr("%1 - Version %2", "Launcher - Version X").arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString()); if (!BuildConfig.BUILD_PL |
