]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Readd the "go home" action
authorPeter Penz <peter.penz19@gmail.com>
Tue, 29 Mar 2011 16:35:50 +0000 (18:35 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 29 Mar 2011 16:37:40 +0000 (18:37 +0200)
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.

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index e5cc9901f2603e2e4b74df910307a6a45b1defdf..d7b3929b93b1aa83fcec96ceac086bc9a325f459 100644 (file)
@@ -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"));
index 10fcf57fd32daa9278983588777795b9bf5f2842..87f29e865cbd5fe3f88329e11438c6b88fbcca7b 100644 (file)
@@ -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.