Initial RSS re-add and removed hardcoded strings
This commit is contained in:
		@@ -46,12 +46,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
 | 
			
		||||
##################################### Set Application options #####################################
 | 
			
		||||
 | 
			
		||||
######## Set URLs ########
 | 
			
		||||
set(Launcher_NEWS_RSS_URL "https://multimc.org/rss.xml" CACHE STRING "URL to fetch Launcher's news RSS feed from.")
 | 
			
		||||
set(Launcher_NEWS_RSS_URL "https://polymc.github.io/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.")
 | 
			
		||||
set(Launcher_NEWS_OPEN_URL "https://polymc.github.io/news/" CACHE STRING "URL that gets opened when the user clicks 'More News'")
 | 
			
		||||
 | 
			
		||||
######## Set version numbers ########
 | 
			
		||||
set(Launcher_VERSION_MAJOR    1)
 | 
			
		||||
set(Launcher_VERSION_MINOR    0)
 | 
			
		||||
set(Launcher_VERSION_HOTFIX   5)
 | 
			
		||||
set(Launcher_VERSION_HOTFIX   6)
 | 
			
		||||
 | 
			
		||||
# Build number
 | 
			
		||||
set(Launcher_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.")
 | 
			
		||||
 
 | 
			
		||||
@@ -42,6 +42,7 @@ Config::Config()
 | 
			
		||||
 | 
			
		||||
    VERSION_STR = "@Launcher_VERSION_STRING@";
 | 
			
		||||
    NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
 | 
			
		||||
    NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@";
 | 
			
		||||
    IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@";
 | 
			
		||||
    MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@";
 | 
			
		||||
    META_URL = "@Launcher_META_URL@";
 | 
			
		||||
 
 | 
			
		||||
@@ -67,6 +67,11 @@ public:
 | 
			
		||||
     */
 | 
			
		||||
    QString NEWS_RSS_URL;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * URL that gets opened when the user clicks "More News"
 | 
			
		||||
     */
 | 
			
		||||
    QString NEWS_OPEN_URL;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Client ID you can get from Imgur when you register an application
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -1687,7 +1687,7 @@ void MainWindow::on_actionReportBug_triggered()
 | 
			
		||||
 | 
			
		||||
void MainWindow::on_actionMoreNews_triggered()
 | 
			
		||||
{
 | 
			
		||||
    DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
 | 
			
		||||
    DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::newsButtonClicked()
 | 
			
		||||
@@ -1699,7 +1699,7 @@ void MainWindow::newsButtonClicked()
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        DesktopServices::openUrl(QUrl("https://multimc.org/posts.html"));
 | 
			
		||||
        DesktopServices::openUrl(QUrl(BuildConfig.NEWS_OPEN_URL));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user