diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 10 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 9bcfc9ebb..9b4ac64c9 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1177,6 +1177,16 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, } } +QMenu *DolphinMainWindow::createPopupMenu() +{ + QMenu *menu = KXmlGuiWindow::createPopupMenu(); + + menu->addSeparator(); + menu->addAction(actionCollection()->action(QStringLiteral("lock_panels"))); + + return menu; +} + void DolphinMainWindow::updateHamburgerMenu() { KActionCollection* ac = actionCollection(); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 5ada022cb..1a3ec4efb 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -96,6 +96,12 @@ public: KNewFileMenu* newFileMenu() const; /** + * Augments Qt's build-in QMainWindow context menu to add + * Dolphin-specific actions, such as "unlock panels". + */ + QMenu *createPopupMenu() override; + + /** * Switch the window's view containers' locations to display the home path * for any which are currently displaying a location corresponding to or * within mountPath. |
