summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-23 19:10:19 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-23 19:10:19 -0400
commit088f27fe48cd8f218052090a97e8187eedf0c06e (patch)
tree87e2695ff28c5fa4a7ef3610a0898f22776074e6 /src/mainwindow.cpp
parent200b5283eb5a0eff5ed18e772930b99eea5e11ef (diff)
changed the layout of the general settings tab
added option to disable checking for updates removed online check, just try it and see
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 42cbe919..cd650d2f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -263,6 +263,7 @@ MainWindow::MainWindow(Settings &settings
setupToolbar();
toggleMO2EndorseState();
+ toggleUpdateAction();
TaskProgressManager::instance().tryCreateTaskbar();
@@ -5007,6 +5008,7 @@ void MainWindow::on_actionSettings_triggered()
bool oldDisplayForeign(settings.interface().displayForeign());
bool proxy = settings.network().useProxy();
DownloadManager *dlManager = m_OrganizerCore.downloadManager();
+ const bool oldCheckForUpdates = settings.checkForUpdates();
SettingsDialog dialog(&m_PluginContainer, settings, this);
@@ -5084,6 +5086,14 @@ void MainWindow::on_actionSettings_triggered()
m_OrganizerCore.cycleDiagnostics();
toggleMO2EndorseState();
+
+ if (oldCheckForUpdates != settings.checkForUpdates()) {
+ toggleUpdateAction();
+
+ if (settings.checkForUpdates()) {
+ m_OrganizerCore.checkForUpdates();
+ }
+ }
}
void MainWindow::on_actionNexus_triggered()
@@ -5596,6 +5606,12 @@ void MainWindow::toggleMO2EndorseState()
ui->actionEndorseMO->setStatusTip(text);
}
+void MainWindow::toggleUpdateAction()
+{
+ const auto& s = m_OrganizerCore.settings();
+ ui->actionUpdate->setVisible(s.checkForUpdates());
+}
+
void MainWindow::nxmEndorsementsAvailable(QVariant userData, QVariant resultData, int)
{
QVariantList data = resultData.toList();