mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 03:14:49 +00:00
NOISSUE Customizable Patreon URL
This commit is contained in:
parent
bb04cb09a3
commit
41e3e05454
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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/";
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user