mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 03:14:49 +00:00
Merge pull request #5431 from sasha0552/cust-news-url
NOISSUE Customizable news URL
This commit is contained in:
commit
8a265eb67d
@ -68,6 +68,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
|
||||
##################################### Set Application options #####################################
|
||||
|
||||
######## Set URLs ########
|
||||
set(Launcher_NEWS_URL "https://multimc.org/posts.html" CACHE STRING "URL to open Launcher's news.")
|
||||
set(Launcher_NEWS_RSS_URL "https://multimc.org/rss.xml" CACHE STRING "URL to fetch Launcher's news RSS feed from.")
|
||||
|
||||
######## Set version numbers ########
|
||||
|
@ -42,6 +42,7 @@ Config::Config()
|
||||
}
|
||||
|
||||
VERSION_STR = "@Launcher_VERSION_STRING@";
|
||||
NEWS_URL = "@Launcher_NEWS_URL@";
|
||||
NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
|
||||
PASTE_EE_KEY = "@Launcher_PASTE_EE_API_KEY@";
|
||||
IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@";
|
||||
|
@ -64,6 +64,12 @@ public:
|
||||
/// This is printed on start to standard output
|
||||
QString VERSION_STR;
|
||||
|
||||
/**
|
||||
* This is used to open the news page with the "More news" button.
|
||||
* It defaults in CMakeLists.txt to "https://multimc.org/posts.html"
|
||||
*/
|
||||
QString NEWS_URL;
|
||||
|
||||
/**
|
||||
* This is used to fetch the news RSS feed.
|
||||
* It defaults in CMakeLists.txt to "https://multimc.org/rss.xml"
|
||||
|
@ -1737,7 +1737,7 @@ void MainWindow::on_actionPatreon_triggered()
|
||||
|
||||
void MainWindow::on_actionMoreNews_triggered()
|
||||
{
|
||||
DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
|
||||
DesktopServices::openUrl(QUrl(BuildConfig.NEWS_URL));
|
||||
}
|
||||
|
||||
void MainWindow::newsButtonClicked()
|
||||
@ -1749,7 +1749,7 @@ void MainWindow::newsButtonClicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
|
||||
DesktopServices::openUrl(QUrl(BuildConfig.NEWS_URL));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user