diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-11 09:02:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 09:02:41 +0200 |
commit | ac8ee9f981ea509c04ce64d70a47429a1207e18e (patch) | |
tree | 8d7b3421af32ead8ee31f70a00ddd6fa14c81afd /launcher/ui/pages | |
parent | cd948dceaed4625e7a876f680d3dc028e6cfe6de (diff) | |
parent | eae8a2914e99f6e9a6db042a0bc0f984fd890227 (diff) | |
download | PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.gz PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.bz2 PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.zip |
Merge pull request #479 from kthchew/feature/sparkle-mac
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 29 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.ui | 2 |
2 files changed, 28 insertions, 3 deletions
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index 4be24979..73ef0024 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -90,6 +90,13 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch { APPLICATION->updateChecker()->updateChanList(false); } + + if (APPLICATION->updateChecker()->getExternalUpdater()) + { + ui->updateChannelComboBox->setVisible(false); + ui->updateChannelDescLabel->setVisible(false); + ui->updateChannelLabel->setVisible(false); + } } else { @@ -266,7 +273,16 @@ void LauncherPage::applySettings() auto s = APPLICATION->settings(); // Updates - s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); + if (BuildConfig.UPDATER_ENABLED && APPLICATION->updateChecker()->getExternalUpdater()) + { + APPLICATION->updateChecker()->getExternalUpdater()->setAutomaticallyChecksForUpdates( + ui->autoUpdateCheckBox->isChecked()); + } + else + { + s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); + } + s->set("UpdateChannel", m_currentUpdateChannel); auto original = s->get("IconTheme").toString(); //FIXME: make generic @@ -351,7 +367,16 @@ void LauncherPage::loadSettings() { auto s = APPLICATION->settings(); // Updates - ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); + if (BuildConfig.UPDATER_ENABLED && APPLICATION->updateChecker()->getExternalUpdater()) + { + ui->autoUpdateCheckBox->setChecked( + APPLICATION->updateChecker()->getExternalUpdater()->getAutomaticallyChecksForUpdates()); + } + else + { + ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); + } + m_currentUpdateChannel = s->get("UpdateChannel").toString(); //FIXME: make generic auto theme = s->get("IconTheme").toString(); diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui index 417bbe05..645f7ef6 100644 --- a/launcher/ui/pages/global/LauncherPage.ui +++ b/launcher/ui/pages/global/LauncherPage.ui @@ -54,7 +54,7 @@ <item> <widget class="QCheckBox" name="autoUpdateCheckBox"> <property name="text"> - <string>Check for updates on start?</string> + <string>Check for updates automatically</string> </property> </widget> </item> |