diff options
| author | Peter Penz <[email protected]> | 2009-06-08 05:55:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-06-08 05:55:46 +0000 |
| commit | a38f83014467f61059fc40b2273d0175e9b3b26d (patch) | |
| tree | a83c930af5c6092697ea675f00216bcbfb899525 /src/dolphinviewcontainer.cpp | |
| parent | d34036152b86d86d1dabe2d719d5abe1e6f205a5 (diff) | |
Mark the last visitied directory as active when going back in history.
BUG: 192811
svn path=/trunk/KDE/kdebase/apps/; revision=978757
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 9f61360d7..cffffd70b 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -155,6 +155,8 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow, connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)), this, SLOT(restoreView(const KUrl&))); + connect(m_urlNavigator, SIGNAL(historyChanged()), + this, SLOT(slotHistoryChanged())); m_statusBar = new DolphinStatusBar(this, m_view); @@ -452,6 +454,17 @@ void DolphinViewContainer::saveUrlCompletionMode(KGlobalSettings::Completion com settings.save(); } +void DolphinViewContainer::slotHistoryChanged() +{ + const int index = m_urlNavigator->historyIndex(); + if (index > 0) { + // The "Go Forward" action is enabled. Try to mark + // the previous directory as active item: + const KUrl url = m_urlNavigator->historyUrl(index - 1); + m_view->activateItem(url); + } +} + void DolphinViewContainer::slotItemTriggered(const KFileItem& item) { KUrl url = item.targetUrl(); |
