summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-06-12 19:12:34 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-06-12 19:12:34 -0400
commit4a7a77480bfd44c7780e9e37bceadac7e367c062 (patch)
tree3cceddbc3b021d8b29ba760847fe5541337b780c /src/mainwindow.cpp
parent16d6a4c528fd226ac5bf9a2ff54911c567d5bca0 (diff)
changed StatusBarNotifications to a generic StatusBarAction
added update notification to statusbar
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 6d65d64c..2497b05d 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -243,7 +243,7 @@ MainWindow::MainWindow(QSettings &initSettings
connect(ui->logList->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
ui->logList, SLOT(scrollToBottom()));
- m_statusBar.reset(new StatusBar(statusBar(), ui->actionNotifications));
+ m_statusBar.reset(new StatusBar(statusBar(), ui));
updateProblemsButton();
@@ -571,7 +571,7 @@ void MainWindow::updateWindowTitle(const APIUserAccount& user)
void MainWindow::onRequestsChanged(const APIStats& stats, const APIUserAccount& user)
{
- m_statusBar->updateAPI(stats, user);
+ m_statusBar->setAPI(stats, user);
}
@@ -902,7 +902,7 @@ void MainWindow::updateProblemsButton()
// updating the status bar, may be null very early when MO is starting
if (m_statusBar) {
- m_statusBar->updateNotifications(numProblems > 0);
+ m_statusBar->setNotifications(numProblems > 0);
}
}
@@ -5593,13 +5593,9 @@ void MainWindow::openDataOriginExplorer_clicked()
void MainWindow::updateAvailable()
{
- for (QAction *action : ui->toolBar->actions()) {
- if (action->text() == tr("Update")) {
- action->setEnabled(true);
- action->setToolTip(tr("Update available"));
- break;
- }
- }
+ ui->actionUpdate->setEnabled(true);
+ ui->actionUpdate->setToolTip(tr("Update available"));
+ m_statusBar->setUpdateAvailable(true);
}