NOISSUE Customizable Patreon URL

This commit is contained in:
sasha0552 2024-05-31 13:33:27 +00:00 committed by GitHub
parent bb04cb09a3
commit 41e3e05454
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 8 deletions

View File

@ -108,6 +108,9 @@ set(Launcher_DISCORD_URL "" CACHE STRING "URL for the Discord guild.")
# Subreddit URL
set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.")
# Patreon URL
set(Launcher_PATREON_URL "" CACHE STRING "URL for the patreon.")
# Use the secrets library or a public stub?
option(Launcher_EMBED_SECRETS "Determines whether to embed secrets. Secrets are separate and non-public." OFF)

View File

@ -50,6 +50,7 @@ Config::Config()
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
DISCORD_URL = "@Launcher_DISCORD_URL@";
SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
PATREON_URL = "@Launcher_PATREON_URL@";
}
QString Config::printableVersionString() const

View File

@ -88,6 +88,7 @@ public:
QString BUG_TRACKER_URL;
QString DISCORD_URL;
QString SUBREDDIT_URL;
QString PATREON_URL;
QString RESOURCE_BASE = "https://resources.download.minecraft.net/";
QString LIBRARY_BASE = "https://libraries.minecraft.net/";

View File

@ -403,13 +403,16 @@ public:
mainToolBar->addSeparator();
actionPatreon = TranslatedAction(MainWindow);
actionPatreon->setObjectName(QStringLiteral("actionPatreon"));
actionPatreon->setIcon(APPLICATION->getThemedIcon("patreon"));
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);
if (!BuildConfig.PATREON_URL.isEmpty())
{
actionPatreon = TranslatedAction(MainWindow);
actionPatreon->setObjectName(QStringLiteral("actionPatreon"));
actionPatreon->setIcon(APPLICATION->getThemedIcon("patreon"));
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);
}
actionCAT = TranslatedAction(MainWindow);
actionCAT->setObjectName(QStringLiteral("actionCAT"));
@ -1732,7 +1735,7 @@ void MainWindow::on_actionReportBug_triggered()
void MainWindow::on_actionPatreon_triggered()
{
DesktopServices::openUrl(QUrl("https://www.patreon.com/multimc"));
DesktopServices::openUrl(QUrl(BuildConfig.PATREON_URL));
}
void MainWindow::on_actionMoreNews_triggered()