┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/dolphinmainwindow.cpp9
-rw-r--r--src/settings/dolphin_generalsettings.kcfg4
2 files changed, 13 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());
diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg
index b2460b11c..0267dcb75 100644
--- a/src/settings/dolphin_generalsettings.kcfg
+++ b/src/settings/dolphin_generalsettings.kcfg
@@ -10,6 +10,9 @@
<kcfgfile name="dolphinrc"/>
<signal name="sortingChoiceChanged" />
<signal name="splitViewChanged" />
+ <signal name="showStatusBarChanged">
+ <argument type="Bool">showStatusBar</argument>
+ </signal>
<group name="General">
<entry name="EditableUrl" type="Bool">
<label>Should the URL be editable for the user</label>
@@ -106,6 +109,7 @@
<entry name="ShowStatusBar" type="Bool">
<label>Show the statusbar</label>
<default>true</default>
+ <emit signal="showStatusBarChanged" />
</entry>
<entry name="ShowZoomSlider" type="Bool">
<label>Show zoom slider in the statusbar</label>