diff --git a/gui/common.h b/gui/common.h index aed345f27..8157cf9f3 100644 --- a/gui/common.h +++ b/gui/common.h @@ -57,6 +57,7 @@ ShowTypes; #define SETTINGS_RESULT_COLUMN_WIDTH "Result column %1 width" #define SETTINGS_LANGUAGE "Application language" #define SETTINGS_TOOLBARS_SHOW "Toolbars/ShowStandard" +#define SETTINGS_TOOLBARS_VIEW_SHOW "Toolbars/ShowView" /// @} #endif diff --git a/gui/main.ui b/gui/main.ui index 7f4487a68..296a877c0 100644 --- a/gui/main.ui +++ b/gui/main.ui @@ -85,6 +85,7 @@ &Toolbars + @@ -153,9 +154,9 @@ - + - toolBar + Categories TopToolBarArea @@ -335,6 +336,17 @@ Toolbar + + + true + + + &Categories + + + Error categories + + diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index a8be786f1..7315e47ae 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -72,6 +72,7 @@ MainWindow::MainWindow() : connect(mUI.mActionAbout, SIGNAL(triggered()), this, SLOT(About())); connect(mUI.mActionLicense, SIGNAL(triggered()), this, SLOT(ShowLicense())); connect(mUI.mActionToolbar, SIGNAL(toggled(bool)), this, SLOT(ToggleToolbar())); + connect(mUI.mActionToolBarView, SIGNAL(toggled(bool)), this, SLOT(ToggleViewToolBar())); connect(mUI.mActionAuthors, SIGNAL(triggered()), this, SLOT(ShowAuthors())); connect(mThread, SIGNAL(Done()), this, SLOT(CheckDone())); @@ -163,6 +164,7 @@ void MainWindow::LoadSettings() mUI.mActionToolbar->setChecked(mSettings->value(SETTINGS_TOOLBARS_SHOW, true).toBool()); mUI.mToolBarMain->setVisible(mSettings->value(SETTINGS_TOOLBARS_SHOW, true).toBool()); + mUI.mToolBarView->setVisible(mSettings->value(SETTINGS_TOOLBARS_VIEW_SHOW, true).toBool()); mApplications->LoadSettings(mSettings); @@ -181,6 +183,7 @@ void MainWindow::SaveSettings() mSettings->setValue(SETTINGS_SHOW_STYLE, mUI.mActionShowStyle->isChecked()); mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked()); mSettings->setValue(SETTINGS_TOOLBARS_SHOW, mUI.mToolBarMain->isVisible()); + mSettings->setValue(SETTINGS_TOOLBARS_VIEW_SHOW, mUI.mToolBarView->isVisible()); mApplications->SaveSettings(mSettings); @@ -568,6 +571,11 @@ void MainWindow::ToggleToolbar() mUI.mToolBarMain->setVisible(mUI.mActionToolbar->isChecked()); } +void MainWindow::ToggleViewToolBar() +{ + mUI.mToolBarView->setVisible(mUI.mActionToolBarView->isChecked()); +} + void MainWindow::FormatAndSetTitle(const QString &text) { QString title; @@ -631,6 +639,7 @@ void MainWindow::MapLanguage(QAction *action) void MainWindow::AboutToShowViewMenu() { mUI.mActionToolbar->setChecked(mUI.mToolBarMain->isVisible()); + mUI.mActionToolBarView->setChecked(mUI.mToolBarView->isVisible()); } void MainWindow::StopChecking() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 457163ed2..e5bc37758 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -150,6 +150,11 @@ protected slots: */ void ToggleToolbar(); + /** + * @brief Slot for showing/hiding Categories toolbar + */ + void ToggleViewToolBar(); + /** * @brief Slot for updating View-menu before it is shown. */