┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-02-23 15:48:56 +0000
committerPeter Penz <[email protected]>2008-02-23 15:48:56 +0000
commiteb7294fa1076c91d77da982d1d4a0707bbc60b0c (patch)
tree01182044ed101de03add9715a43098acde541ffe /src/dolphinmainwindow.cpp
parent90625552ea0d0ca6e4188972f208068d69e02189 (diff)
minor cleanup: no need to create a slot which just invokes another method, just use the other method as slot
svn path=/trunk/KDE/kdebase/apps/; revision=778423
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 27ed1b89b..ca392c134 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -212,9 +212,20 @@ void DolphinMainWindow::slotRequestItemInfo(const KFileItem& item)
emit requestItemInfo(item);
}
-void DolphinMainWindow::slotHistoryChanged()
+void DolphinMainWindow::updateHistory()
{
- updateHistory();
+ const KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
+ const int index = urlNavigator->historyIndex();
+
+ QAction* backAction = actionCollection()->action("go_back");
+ if (backAction != 0) {
+ backAction->setEnabled(index < urlNavigator->historySize() - 1);
+ }
+
+ QAction* forwardAction = actionCollection()->action("go_forward");
+ if (forwardAction != 0) {
+ forwardAction->setEnabled(index > 0);
+ }
}
void DolphinMainWindow::updateFilterBarAction(bool show)
@@ -897,22 +908,6 @@ void DolphinMainWindow::setupDockWidgets()
placesView, SLOT(setUrl(KUrl)));
}
-void DolphinMainWindow::updateHistory()
-{
- const KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
- const int index = urlNavigator->historyIndex();
-
- QAction* backAction = actionCollection()->action("go_back");
- if (backAction != 0) {
- backAction->setEnabled(index < urlNavigator->historySize() - 1);
- }
-
- QAction* forwardAction = actionCollection()->action("go_forward");
- if (forwardAction != 0) {
- forwardAction->setEnabled(index > 0);
- }
-}
-
void DolphinMainWindow::updateEditActions()
{
const KFileItemList list = m_activeViewContainer->view()->selectedItems();
@@ -991,7 +986,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
connect(navigator, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(changeUrl(const KUrl&)));
connect(navigator, SIGNAL(historyChanged()),
- this, SLOT(slotHistoryChanged()));
+ this, SLOT(updateHistory()));
connect(navigator, SIGNAL(editableStateChanged(bool)),
this, SLOT(slotEditableStateChanged(bool)));
}