diff --git a/src/base/preferences.cpp b/src/base/preferences.cpp index d951db38d..bf376b676 100644 --- a/src/base/preferences.cpp +++ b/src/base/preferences.cpp @@ -181,6 +181,16 @@ void Preferences::setToolbarDisplayed(bool displayed) setValue("Preferences/General/ToolbarDisplayed", displayed); } +bool Preferences::isStatusbarDisplayed() const +{ + return value("Preferences/General/StatusbarDisplayed", true).toBool(); +} + +void Preferences::setStatusbarDisplayed(bool displayed) +{ + setValue("Preferences/General/StatusbarDisplayed", displayed); +} + bool Preferences::minimizeToTray() const { return value("Preferences/General/MinimizeToTray", false).toBool(); diff --git a/src/base/preferences.h b/src/base/preferences.h index 60a936657..3a806549e 100644 --- a/src/base/preferences.h +++ b/src/base/preferences.h @@ -119,6 +119,8 @@ public: void setSystrayIntegration(bool enabled); bool isToolbarDisplayed() const; void setToolbarDisplayed(bool displayed); + bool isStatusbarDisplayed() const; + void setStatusbarDisplayed(bool displayed); bool minimizeToTray() const; void setMinimizeToTray(bool b); bool closeToTray() const; diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 6d2c79fee..4766d55a7 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -300,6 +300,7 @@ MainWindow::MainWindow(QWidget *parent) // View settings m_ui->actionTopToolBar->setChecked(pref->isToolbarDisplayed()); + m_ui->actionShowStatusbar->setChecked(pref->isStatusbarDisplayed()); m_ui->actionSpeedInTitleBar->setChecked(pref->speedInTitleBar()); m_ui->actionRSSReader->setChecked(pref->isRSSWidgetEnabled()); m_ui->actionSearchWidget->setChecked(pref->isSearchEnabled()); @@ -1284,6 +1285,8 @@ void MainWindow::loadPreferences(bool configureSession) m_ui->toolBar->setVisible(false); } + m_statusBar->setVisible(pref->isStatusbarDisplayed()); + if (pref->preventFromSuspend() && !m_preventTimer->isActive()) { m_preventTimer->start(PREVENT_SUSPEND_INTERVAL); } @@ -1543,6 +1546,13 @@ void MainWindow::on_actionTopToolBar_triggered() Preferences::instance()->setToolbarDisplayed(isVisible); } +void MainWindow::on_actionShowStatusbar_triggered() +{ + bool isVisible = static_cast(sender())->isChecked(); + m_statusBar->setVisible(isVisible); + Preferences::instance()->setStatusbarDisplayed(isVisible); +} + void MainWindow::on_actionSpeedInTitleBar_triggered() { m_displaySpeedInTitle = static_cast(sender())->isChecked(); diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index a64af6041..fb92c0b64 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -155,6 +155,7 @@ private slots: void on_actionRSSReader_triggered(); void on_actionSpeedInTitleBar_triggered(); void on_actionTopToolBar_triggered(); + void on_actionShowStatusbar_triggered(); void on_actionDonateMoney_triggered(); void on_actionExecutionLogs_triggered(bool checked); void on_actionNormalMessages_triggered(bool checked); diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui index e98fcea71..85003cb85 100644 --- a/src/gui/mainwindow.ui +++ b/src/gui/mainwindow.ui @@ -110,6 +110,7 @@ + @@ -300,6 +301,14 @@ Display Top Toolbar + + + true + + + Status &Bar + + true