summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-12-28 04:45:49 +0100
committerPetr Mrázek <peterix@gmail.com>2015-12-28 05:36:17 +0100
commit5402acb3c6cf9b63c9df69ee463cae02259dfdef (patch)
tree76bbfd58704b3634fe6a707c6ec13a5dccb267ea /application/pages
parente8063d193d56acc10c5a533cffd95c9271b24e65 (diff)
downloadMultiMC-5402acb3c6cf9b63c9df69ee463cae02259dfdef.tar
MultiMC-5402acb3c6cf9b63c9df69ee463cae02259dfdef.tar.gz
MultiMC-5402acb3c6cf9b63c9df69ee463cae02259dfdef.tar.lz
MultiMC-5402acb3c6cf9b63c9df69ee463cae02259dfdef.tar.xz
MultiMC-5402acb3c6cf9b63c9df69ee463cae02259dfdef.zip
GH-1360 add basic changelog based on github API, fix update dialog buttons
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/global/MultiMCPage.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp
index 18f30010..c1a24a56 100644
--- a/application/pages/global/MultiMCPage.cpp
+++ b/application/pages/global/MultiMCPage.cpp
@@ -27,6 +27,7 @@
#include "settings/SettingsObject.h"
#include <FileSystem.h>
#include "MultiMC.h"
+#include "BuildConfig.h"
// FIXME: possibly move elsewhere
enum InstSortMode
@@ -55,16 +56,23 @@ MultiMCPage::MultiMCPage(QWidget *parent) : QWidget(parent), ui(new Ui::MultiMCP
loadSettings();
- QObject::connect(MMC->updateChecker().get(), &UpdateChecker::channelListLoaded, this,
- &MultiMCPage::refreshUpdateChannelList);
-
- if (MMC->updateChecker()->hasChannels())
+ if(BuildConfig.UPDATER_ENABLED)
{
- refreshUpdateChannelList();
+ QObject::connect(MMC->updateChecker().get(), &UpdateChecker::channelListLoaded, this,
+ &MultiMCPage::refreshUpdateChannelList);
+
+ if (MMC->updateChecker()->hasChannels())
+ {
+ refreshUpdateChannelList();
+ }
+ else
+ {
+ MMC->updateChecker()->updateChanList(false);
+ }
}
else
{
- MMC->updateChecker()->updateChanList(false);
+ ui->updateSettingsBox->setHidden(true);
}
connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview()));
connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview()));