┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2022-07-05 21:02:56 +0200
committerKai Uwe Broulik <[email protected]>2022-07-13 17:13:25 +0200
commit05941a522b8db4734b2601979e64a63b90049262 (patch)
tree843fdc688cbfc7db836e35fd0d877b99b1357fcf /src/dolphinmainwindow.cpp
parentc6f82aa378a58feaff5ad015057831e5bc535f0e (diff)
Add "Show statusbar" menu entry in "Settings"
Makes this setting more accessible and makes it consistent with other KDE applications. Since Dolphin has a separate status bar on each view container and doesn't use kxmlgui's statusbar, we don't get this menu entry automatically.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 65c99329b..2a2ac3637 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1802,6 +1802,15 @@ void DolphinMainWindow::setupActions()
"contain mostly the same commands and configuration options."));
connect(showMenuBar, &KToggleAction::triggered, // Fixes #286822
this, &DolphinMainWindow::toggleShowMenuBar, Qt::QueuedConnection);
+
+ KToggleAction* showStatusBar = KStandardAction::showStatusbar(nullptr, nullptr, actionCollection());
+ showStatusBar->setChecked(GeneralSettings::showStatusBar());
+ connect(GeneralSettings::self(), &GeneralSettings::showStatusBarChanged, showStatusBar, &KToggleAction::setChecked);
+ connect(showStatusBar, &KToggleAction::triggered, this, [this](bool checked) {
+ GeneralSettings::setShowStatusBar(checked);
+ refreshViews();
+ });
+
KStandardAction::keyBindings(this, &DolphinMainWindow::slotKeyBindings, actionCollection());
KStandardAction::preferences(this, &DolphinMainWindow::editSettings, actionCollection());