diff options
author | Ezekiel Smith <ezekielsmith@protonmail.com> | 2022-03-08 01:22:34 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 01:22:34 +1100 |
commit | dc9e2508684b6cbedd03c36fcbb4b91095962e91 (patch) | |
tree | 8c4a5cd2a846f4de7fd3c9ca8e1a32cd9c4199a7 | |
parent | b6cf0359faf1d366a4afd92930008d25ea492049 (diff) | |
parent | b93daf1fb743f09d48595f554d93a49fe448d6b7 (diff) | |
download | PrismLauncher-dc9e2508684b6cbedd03c36fcbb4b91095962e91.tar.gz PrismLauncher-dc9e2508684b6cbedd03c36fcbb4b91095962e91.tar.bz2 PrismLauncher-dc9e2508684b6cbedd03c36fcbb4b91095962e91.zip |
Merge pull request #232 from Scrumplex/fix-help-links
Switch to polymc.org wiki
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | buildconfig/BuildConfig.cpp.in | 1 | ||||
-rw-r--r-- | buildconfig/BuildConfig.h | 5 | ||||
-rw-r--r-- | launcher/ui/widgets/PageContainer.cpp | 3 |
4 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c370b6ea..e2545ba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y") ##################################### Set Application options ##################################### ######## Set URLs ######## -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(Launcher_NEWS_RSS_URL "https://polymc.org/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.") +set(Launcher_NEWS_OPEN_URL "https://polymc.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'") +set(Launcher_HELP_URL "https://polymc.org/wiki/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help") ######## Set version numbers ######## set(Launcher_VERSION_MAJOR 1) diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in index 0ffc9326..80c67037 100644 --- a/buildconfig/BuildConfig.cpp.in +++ b/buildconfig/BuildConfig.cpp.in @@ -50,6 +50,7 @@ Config::Config() VERSION_STR = "@Launcher_VERSION_STRING@"; NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@"; NEWS_OPEN_URL = "@Launcher_NEWS_OPEN_URL@"; + HELP_URL = "@Launcher_HELP_URL@"; IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@"; MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@"; META_URL = "@Launcher_META_URL@"; diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index 863f88df..95619587 100644 --- a/buildconfig/BuildConfig.h +++ b/buildconfig/BuildConfig.h @@ -74,6 +74,11 @@ public: QString NEWS_OPEN_URL; /** + * URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help + */ + QString HELP_URL; + + /** * Client ID you can get from Imgur when you register an application */ QString IMGUR_CLIENT_ID; diff --git a/launcher/ui/widgets/PageContainer.cpp b/launcher/ui/widgets/PageContainer.cpp index 6de49467..558a98fb 100644 --- a/launcher/ui/widgets/PageContainer.cpp +++ b/launcher/ui/widgets/PageContainer.cpp @@ -14,6 +14,7 @@ */ #include "PageContainer.h" +#include "BuildConfig.h" #include "PageContainer_p.h" #include <QStackedLayout> @@ -207,7 +208,7 @@ void PageContainer::help() QString pageId = m_currentPage->helpPage(); if (pageId.isEmpty()) return; - DesktopServices::openUrl(QUrl("https://github.com/PolyMC/PolyMC/wiki/" + pageId)); + DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg(pageId))); } } |