X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/1d27156cdc18e2600fc6e30099ca20452045fabb..05fec8d24bcfbcb7bccc923df95776c4dc89e99d:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3f527d9a5..60fded631 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -510,12 +510,12 @@ void DolphinMainWindow::openNewTab(const KUrl& url) actionCollection()->action("close_tab")->setEnabled(true); - // provide a split view, if the startup settings are set this way + // Provide a split view, if the startup settings are set this way if (GeneralSettings::splitView()) { const int newTabIndex = m_viewTab.count() - 1; createSecondaryView(newTabIndex); - viewTab.secondaryView->setActive(true); - viewTab.isPrimaryViewActive = false; + m_viewTab[newTabIndex].secondaryView->setActive(true); + m_viewTab[newTabIndex].isPrimaryViewActive = false; } if (focusWidget) { @@ -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");