From 101884841659cf7b1d735e894477415cddd1787f Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Thu, 24 Aug 2017 15:45:28 +0200 Subject: Support middle clicking of Back/Forward/Up/Home toolbar buttons This opens the resulting page in a new tab. BUG: 358649 Differential Revision: https://phabricator.kde.org/D7390 --- src/dolphinmainwindow.h | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index d741eb21e..06eb5a7a5 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -267,28 +267,17 @@ private slots: /** Changes the location to the home URL. */ void goHome(); - /** - * Open the previous URL in the URL history in a new tab - * if the middle mouse button is clicked. - */ - void goBack(Qt::MouseButtons buttons); + /** Open the previous URL in the URL history in a new tab. */ + void goBackInNewTab(); - /** - * Open the next URL in the URL history in a new tab - * if the middle mouse button is clicked. - */ - void goForward(Qt::MouseButtons buttons); + /** Open the next URL in the URL history in a new tab. */ + void goForwardInNewTab(); - /** - * Open the URL one hierarchy above the current URL in a new tab - * if the middle mouse button is clicked. - */ - void goUp(Qt::MouseButtons buttons); + /** Open the URL one hierarchy above the current URL in a new tab. */ + void goUpInNewTab(); - /** - * Open the home URL in a new tab - */ - void goHome(Qt::MouseButtons buttons); + /** * Open the home URL in a new tab. */ + void goHomeInNewTab(); /** Opens Kompare for 2 selected files. */ void compareFiles(); @@ -425,6 +414,14 @@ private slots: */ void slotDirectoryLoadingCompleted(); + /** + * Is called when the user middle clicks a toolbar button. + * + * Here middle clicking Back/Forward/Up/Home will open the resulting + * folder in a new tab. + */ + void slotToolBarActionMiddleClicked(QAction *action); + private: void setupActions(); void setupDockWidgets(); -- cgit v1.3.1