┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-09-24 13:50:31 +0000
committerPeter Penz <[email protected]>2007-09-24 13:50:31 +0000
commit772a55aafc2e558302d042eb65026b9b50302ccc (patch)
tree5101245b249850864d5c82c243c75cd7043de129 /src/dolphinviewcontainer.cpp
parentf78bac99094a9fe485d7ca8dac93654a807430f0 (diff)
Restore the root URL when navigating through the history (this is important for views like the column view where the root URL might differ from the current URL).
svn path=/trunk/KDE/kdebase/apps/; revision=716310
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
-rw-r--r--src/dolphinviewcontainer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index c30b2d0bc..9a358b2ff 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -136,9 +136,11 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
this, SLOT(showInfoMessage(const QString&)));
connect(m_view, SIGNAL(itemTriggered(KFileItem)),
this, SLOT(slotItemTriggered(KFileItem)));
+ connect(m_view, SIGNAL(rootUrlChanged(const KUrl&)),
+ m_urlNavigator, SLOT(saveRootUrl(const KUrl&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- m_view, SLOT(setUrl(const KUrl&)));
+ this, SLOT(restoreView(const KUrl&)));
m_statusBar = new DolphinStatusBar(this, url);
connect(m_view, SIGNAL(urlChanged(const KUrl&)),
@@ -491,6 +493,12 @@ void DolphinViewContainer::activate()
setActive(true);
}
+void DolphinViewContainer::restoreView(const KUrl& url)
+{
+ m_view->setRootUrl(m_urlNavigator->savedRootUrl());
+ m_view->setUrl(url);
+}
+
void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
{
// Prefer the local path over the URL.