diff options
| author | David Hallas <[email protected]> | 2019-04-11 19:21:41 +0200 |
|---|---|---|
| committer | David Hallas <[email protected]> | 2019-09-29 14:16:11 +0200 |
| commit | eec49bc38f4e256b66bf16ee5428c5f5d7e97e25 (patch) | |
| tree | 54d193497a3ede2cd131fdfd652541f2560d1f6f /src/dolphinmainwindow.h | |
| parent | a2730fad4323c3af0b5198a31021eed9c9a336e7 (diff) | |
Add navigation history to forward/back buttons
Summary:
Adds navigation history to forward/back buttons in the toolbar. This
changes the forward/back buttons in the toolbar to use the
KToolBarPopupAction class which provides access to a drop down menu.
Test Plan:
Browse some folders
Click the back drop down menu and navigate somewhere
Click the forward drop down menu and navigate somewhere
FEATURE: 157819
FIXED-IN: 19.12.0
Reviewers: #dolphin, ngraham, elvisangelaccio, #vdg
Reviewed By: #dolphin, ngraham, elvisangelaccio, #vdg
Subscribers: felixernst, nerdopolist, mart, richardl, ognarb, david.fontanals, abetts, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19311
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 253fc74d4..3d86340d6 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -47,6 +47,7 @@ class KFileItemList; class KJob; class KNewFileMenu; class KHelpMenu; +class KToolBarPopupAction; class QToolButton; class QIcon; class PlacesPanel; @@ -509,6 +510,36 @@ private slots: */ void slotToolBarActionMiddleClicked(QAction *action); + /** + * Is called before the Back popup menu is shown. This slot will populate + * the menu with history data + */ + void slotAboutToShowBackPopupMenu(); + + /** + * This slot is used by the Back Popup Menu to go back to a specific + * history index. The QAction::data will carry an int with the index + * to go to. + */ + void slotGoBack(QAction* action); + + /** + * Middle clicking Back/Forward will open the resulting folder in a new tab. + */ + void slotBackForwardActionMiddleClicked(QAction *action); + + /** + * Is called before the Forward popup menu is shown. This slot will populate + * the menu with history data + */ + void slotAboutToShowForwardPopupMenu(); + + /** + * This slot is used by the Forward Popup Menu to go forward to a specific + * history index. The QAction::data will carry an int with the index + * to go to. + */ + void slotGoForward(QAction* action); private: /** * Sets up the various menus and actions and connects them. @@ -599,6 +630,9 @@ private: TerminalPanel* m_terminalPanel; PlacesPanel* m_placesPanel; bool m_tearDownFromPlacesRequested; + + KToolBarPopupAction* m_backAction; + KToolBarPopupAction* m_forwardAction; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const |
