┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-03-29 18:35:50 +0200
committerPeter Penz <[email protected]>2011-03-29 18:37:40 +0200
commit5ff682d852a07b5121e49d8ed2a239b0a1762b6b (patch)
tree38f8e4626b9e42856e6a2ca15b1057b8e8bf5efe
parent2dcc433ab2c353a40e3c65f3df46e8a1eac697cc (diff)
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.
-rw-r--r--src/dolphinmainwindow.cpp12
-rw-r--r--src/dolphinmainwindow.h3
2 files changed, 11 insertions, 4 deletions
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.