diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2545ba5..e633eb55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,9 +82,14 @@ set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STR
# Translations Platform URL
set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.")
+# Matrix Space
+set(Launcher_MATRIX_URL "https://matrix.to/#/#polymc:polymc.org" CACHE STRING "URL to the Matrix Space")
+
# Discord URL
set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.")
+
+
# Subreddit URL
set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.")
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 80c67037..d1bd4d05 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -57,6 +57,7 @@ Config::Config()
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@";
+ MATRIX_URL = "@Launcher_MATRIX_URL@";
DISCORD_URL = "@Launcher_DISCORD_URL@";
SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
}
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index 95619587..cf74b39e 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -95,6 +95,7 @@ public:
QString BUG_TRACKER_URL;
QString TRANSLATIONS_URL;
+ QString MATRIX_URL;
QString DISCORD_URL;
QString SUBREDDIT_URL;
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc
index ef29cf9b..d31885b9 100644
--- a/launcher/resources/multimc/multimc.qrc
+++ b/launcher/resources/multimc/multimc.qrc
@@ -246,9 +246,13 @@
scalable/screenshot-placeholder.svg
+
+ scalable/matrix.svg
+
scalable/discord.svg
+
32x32/instances/chicken.png
128x128/instances/chicken.png
diff --git a/launcher/resources/multimc/scalable/matrix.svg b/launcher/resources/multimc/scalable/matrix.svg
new file mode 100644
index 00000000..237c55a2
--- /dev/null
+++ b/launcher/resources/multimc/scalable/matrix.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index ad7227cc..2cb3c7fd 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -235,6 +235,7 @@ public:
TranslatedToolButton helpMenuButton;
TranslatedAction actionReportBug;
TranslatedAction actionDISCORD;
+ TranslatedAction actionMATRIX;
TranslatedAction actionREDDIT;
TranslatedAction actionAbout;
@@ -343,13 +344,23 @@ public:
all_actions.append(&actionReportBug);
helpMenu->addAction(actionReportBug);
}
+
+ if(!BuildConfig.MATRIX_URL.isEmpty()) {
+ actionMATRIX = TranslatedAction(MainWindow);
+ actionMATRIX->setObjectName(QStringLiteral("actionMATRIX"));
+ actionMATRIX->setIcon(APPLICATION->getThemedIcon("matrix"));
+ actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix"));
+ actionMATRIX.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Matrix space"));
+ all_actions.append(&actionMATRIX);
+ helpMenu->addAction(actionMATRIX);
+ }
if (!BuildConfig.DISCORD_URL.isEmpty()) {
actionDISCORD = TranslatedAction(MainWindow);
actionDISCORD->setObjectName(QStringLiteral("actionDISCORD"));
actionDISCORD->setIcon(APPLICATION->getThemedIcon("discord"));
actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord"));
- actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 discord voice chat."));
+ actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Discord guild."));
all_actions.append(&actionDISCORD);
helpMenu->addAction(actionDISCORD);
}
@@ -1500,6 +1511,11 @@ void MainWindow::on_actionDISCORD_triggered()
DesktopServices::openUrl(QUrl(BuildConfig.DISCORD_URL));
}
+void MainWindow::on_actionMATRIX_triggered()
+{
+ DesktopServices::openUrl(QUrl(BuildConfig.MATRIX_URL));
+}
+
void MainWindow::on_actionChangeInstIcon_triggered()
{
if (!m_selectedInstance)
diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h
index f6940ab0..bdbe81aa 100644
--- a/launcher/ui/MainWindow.h
+++ b/launcher/ui/MainWindow.h
@@ -73,6 +73,8 @@ private slots:
void on_actionREDDIT_triggered();
+ void on_actionMATRIX_triggered();
+
void on_actionDISCORD_triggered();
void on_actionCopyInstance_triggered();