mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-28 15:18:21 +00:00
Merge pull request #5430 from sasha0552/cust-patreon-url
NOISSUE Customizable Patreon URL
This commit is contained in:
commit
8071a9c289
@ -109,6 +109,9 @@ set(Launcher_DISCORD_URL "" CACHE STRING "URL for the Discord guild.")
|
|||||||
# Subreddit URL
|
# Subreddit URL
|
||||||
set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.")
|
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?
|
# Use the secrets library or a public stub?
|
||||||
option(Launcher_EMBED_SECRETS "Determines whether to embed secrets. Secrets are separate and non-public." OFF)
|
option(Launcher_EMBED_SECRETS "Determines whether to embed secrets. Secrets are separate and non-public." OFF)
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ Config::Config()
|
|||||||
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
|
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
|
||||||
DISCORD_URL = "@Launcher_DISCORD_URL@";
|
DISCORD_URL = "@Launcher_DISCORD_URL@";
|
||||||
SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
|
SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
|
||||||
|
PATREON_URL = "@Launcher_PATREON_URL@";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Config::printableVersionString() const
|
QString Config::printableVersionString() const
|
||||||
|
@ -94,6 +94,7 @@ public:
|
|||||||
QString BUG_TRACKER_URL;
|
QString BUG_TRACKER_URL;
|
||||||
QString DISCORD_URL;
|
QString DISCORD_URL;
|
||||||
QString SUBREDDIT_URL;
|
QString SUBREDDIT_URL;
|
||||||
|
QString PATREON_URL;
|
||||||
|
|
||||||
QString RESOURCE_BASE = "https://resources.download.minecraft.net/";
|
QString RESOURCE_BASE = "https://resources.download.minecraft.net/";
|
||||||
QString LIBRARY_BASE = "https://libraries.minecraft.net/";
|
QString LIBRARY_BASE = "https://libraries.minecraft.net/";
|
||||||
|
@ -403,6 +403,8 @@ public:
|
|||||||
|
|
||||||
mainToolBar->addSeparator();
|
mainToolBar->addSeparator();
|
||||||
|
|
||||||
|
if (!BuildConfig.PATREON_URL.isEmpty())
|
||||||
|
{
|
||||||
actionPatreon = TranslatedAction(MainWindow);
|
actionPatreon = TranslatedAction(MainWindow);
|
||||||
actionPatreon->setObjectName(QStringLiteral("actionPatreon"));
|
actionPatreon->setObjectName(QStringLiteral("actionPatreon"));
|
||||||
actionPatreon->setIcon(APPLICATION->getThemedIcon("patreon"));
|
actionPatreon->setIcon(APPLICATION->getThemedIcon("patreon"));
|
||||||
@ -410,6 +412,7 @@ public:
|
|||||||
actionPatreon.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 Patreon page."));
|
actionPatreon.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 Patreon page."));
|
||||||
all_actions.append(&actionPatreon);
|
all_actions.append(&actionPatreon);
|
||||||
mainToolBar->addAction(actionPatreon);
|
mainToolBar->addAction(actionPatreon);
|
||||||
|
}
|
||||||
|
|
||||||
actionCAT = TranslatedAction(MainWindow);
|
actionCAT = TranslatedAction(MainWindow);
|
||||||
actionCAT->setObjectName(QStringLiteral("actionCAT"));
|
actionCAT->setObjectName(QStringLiteral("actionCAT"));
|
||||||
@ -1732,7 +1735,7 @@ void MainWindow::on_actionReportBug_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionPatreon_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()
|
void MainWindow::on_actionMoreNews_triggered()
|
||||||
|
Loading…
Reference in New Issue
Block a user