diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 11 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 5 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3f527d9a5..4502e703f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1024,6 +1024,14 @@ void DolphinMainWindow::goUp(Qt::MouseButtons buttons) } } +void DolphinMainWindow::goHome(Qt::MouseButtons buttons) +{ + // The default case (left button pressed) is handled in goHome(). + if (buttons == Qt::MidButton) { + openNewTab(GeneralSettings::self()->homeUrl()); + } +} + void DolphinMainWindow::compareFiles() { // The method is only invoked if exactly 2 files have @@ -1690,7 +1698,8 @@ void DolphinMainWindow::setupActions() KAction* upAction = KStandardAction::up(this, SLOT(goUp()), actionCollection()); connect(upAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goUp(Qt::MouseButtons))); - KStandardAction::home(this, SLOT(goHome()), actionCollection()); + KAction* homeAction = KStandardAction::home(this, SLOT(goHome()), actionCollection()); + connect(homeAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goHome(Qt::MouseButtons))); // setup 'Tools' menu KAction* showFilterBar = actionCollection()->addAction("show_filter_bar"); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 998b6fc25..c2a548906 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -301,6 +301,11 @@ private slots: */ void goUp(Qt::MouseButtons buttons); + /** + * Open the home URL in a new tab + */ + void goHome(Qt::MouseButtons buttons); + /** Opens Kompare for 2 selected files. */ void compareFiles(); |
