this, SLOT(showInfoMessage(const QString&)));
connect(m_view, SIGNAL(itemTriggered(KFileItem)),
this, SLOT(slotItemTriggered(KFileItem)));
+ connect(m_view, SIGNAL(startedPathLoading(const KUrl&)),
+ this, 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&)),
adjustedFilter.insert(0, '*');
adjustedFilter.append('*');
- // Use the ProxyModel to filter:
- // This code is #ifdefed as setNameFilter behaves
- // slightly different than the QSortFilterProxyModel
- // as it will not remove directories. I will ask
- // our beloved usability experts for input
- // -- z.
-#if 0
m_dirLister->setNameFilter(adjustedFilter);
m_dirLister->emitChanges();
-#else
- m_proxyModel->setFilterRegExp(nameFilter);
-#endif
updateStatusBar();
}
setActive(true);
}
+void DolphinViewContainer::restoreView(const KUrl& url)
+{
+ m_view->updateView(url, m_urlNavigator->savedRootUrl());
+}
+
+void DolphinViewContainer::saveRootUrl(const KUrl& url)
+{
+ Q_UNUSED(url);
+ m_urlNavigator->saveRootUrl(m_view->rootUrl());
+}
+
void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
{
// Prefer the local path over the URL.