From 05941a522b8db4734b2601979e64a63b90049262 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 5 Jul 2022 21:02:56 +0200 Subject: [PATCH] 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. --- src/dolphinmainwindow.cpp | 9 +++++++++ src/settings/dolphin_generalsettings.kcfg | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 65c99329b6..2a2ac36375 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()); diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg index b2460b11ca..0267dcb758 100644 --- a/src/settings/dolphin_generalsettings.kcfg +++ b/src/settings/dolphin_generalsettings.kcfg @@ -10,6 +10,9 @@ + + showStatusBar + @@ -106,6 +109,7 @@ true +