From: Peter Penz Date: Tue, 29 Mar 2011 16:35:50 +0000 (+0200) Subject: Readd the "go home" action X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/5ff682d852a07b5121e49d8ed2a239b0a1762b6b Readd the "go home" action It got accidently lost during the menu-button changes. Also the clearStatusBar() calls have been removed as this is handled in the DolphinViewContainer internally since a long time already. --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e5cc9901f..d7b3929b9 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -891,8 +891,6 @@ void DolphinMainWindow::slotPlacesPanelVisibilityChanged(bool visible) void DolphinMainWindow::goBack() { - clearStatusBar(); - KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator(); urlNavigator->goBack(); @@ -905,16 +903,19 @@ void DolphinMainWindow::goBack() void DolphinMainWindow::goForward() { - clearStatusBar(); m_activeViewContainer->urlNavigator()->goForward(); } void DolphinMainWindow::goUp() { - clearStatusBar(); m_activeViewContainer->urlNavigator()->goUp(); } +void DolphinMainWindow::goHome() +{ + m_activeViewContainer->urlNavigator()->goHome(); +} + void DolphinMainWindow::goBack(Qt::MouseButtons buttons) { // The default case (left button pressed) is handled in goBack(). @@ -1382,6 +1383,7 @@ void DolphinMainWindow::updateToolBarMenu() goMenu->addAction(ac->action(KStandardAction::name(KStandardAction::Back))); goMenu->addAction(ac->action(KStandardAction::name(KStandardAction::Forward))); goMenu->addAction(ac->action(KStandardAction::name(KStandardAction::Up))); + goMenu->addAction(ac->action(KStandardAction::name(KStandardAction::Home))); goMenu->addAction(ac->action("closed_tabs")); menu->addMenu(goMenu); @@ -1702,6 +1704,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()); + // setup 'Tools' menu KAction* showFilterBar = actionCollection()->addAction("show_filter_bar"); showFilterBar->setText(i18nc("@action:inmenu Tools", "Show Filter Bar")); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 10fcf57fd..87f29e865 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -272,6 +272,9 @@ private slots: /** Goes up one hierarchy of the current URL. */ void goUp(); + /** 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.