summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-09 19:48:46 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-09 19:48:46 +0200
commit6f75009a80e86a70e03cabe982d417aadbf9ee8d (patch)
treec8aa6b98953c63c7f7300db1bfab18c77d238ba2
parent7c51cc475b7cd3098f675fd9c3e23ce380ddb891 (diff)
downloadMultiMC-6f75009a80e86a70e03cabe982d417aadbf9ee8d.tar
MultiMC-6f75009a80e86a70e03cabe982d417aadbf9ee8d.tar.gz
MultiMC-6f75009a80e86a70e03cabe982d417aadbf9ee8d.tar.lz
MultiMC-6f75009a80e86a70e03cabe982d417aadbf9ee8d.tar.xz
MultiMC-6f75009a80e86a70e03cabe982d417aadbf9ee8d.zip
Show update channel in the update dialog, actually show changelog for the selected update channel.
-rw-r--r--gui/dialogs/UpdateDialog.cpp8
-rw-r--r--gui/dialogs/UpdateDialog.ui2
2 files changed, 7 insertions, 3 deletions
diff --git a/gui/dialogs/UpdateDialog.cpp b/gui/dialogs/UpdateDialog.cpp
index f48d3765..25cfa853 100644
--- a/gui/dialogs/UpdateDialog.cpp
+++ b/gui/dialogs/UpdateDialog.cpp
@@ -1,13 +1,16 @@
#include "UpdateDialog.h"
#include "ui_UpdateDialog.h"
#include "gui/Platform.h"
-#include <BuildConfig.h>
#include "logger/QsLog.h"
+#include "MultiMC.h"
+#include <logic/settings/SettingsObject.h>
UpdateDialog::UpdateDialog(QWidget *parent) : QDialog(parent), ui(new Ui::UpdateDialog)
{
MultiMCPlatform::fixWM_CLASS(this);
ui->setupUi(this);
+ auto channel = MMC->settings()->get("UpdateChannel").toString();
+ ui->label->setText(tr("A new %1 update is available!").arg(channel));
loadChangelog();
}
@@ -17,8 +20,9 @@ UpdateDialog::~UpdateDialog()
void UpdateDialog::loadChangelog()
{
+ auto channel = MMC->settings()->get("UpdateChannel").toString();
dljob.reset(new NetJob("Changelog"));
- auto url = QString("https://raw.githubusercontent.com/MultiMC/MultiMC5/%1/changelog.md").arg(BuildConfig.VERSION_CHANNEL);
+ auto url = QString("https://raw.githubusercontent.com/MultiMC/MultiMC5/%1/changelog.md").arg(channel);
changelogDownload = ByteArrayDownload::make(QUrl(url));
dljob->addNetAction(changelogDownload);
connect(dljob.get(), &NetJob::succeeded, this, &UpdateDialog::changelogLoaded);
diff --git a/gui/dialogs/UpdateDialog.ui b/gui/dialogs/UpdateDialog.ui
index c77d70de..06f4f086 100644
--- a/gui/dialogs/UpdateDialog.ui
+++ b/gui/dialogs/UpdateDialog.ui
@@ -28,7 +28,7 @@
</font>
</property>
<property name="text">
- <string>A new MultiMC update is available!</string>
+ <string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>