GH-1360 add basic changelog based on github API, fix update dialog buttons

This commit is contained in:
Petr Mrázek
2015-12-28 04:45:49 +01:00
parent e8063d193d
commit 5402acb3c6
13 changed files with 377 additions and 121 deletions

View File

@ -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()));