this, SLOT(dropUrls(const KUrl&, QDropEvent*)));
connect(m_urlNavigator, SIGNAL(activated()),
this, SLOT(activate()));
- //connect(m_urlNavigator, SIGNAL(tabRequested(const KUrl&)),
- // this,
connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
this, SLOT(saveUrlCompletionMode(KGlobalSettings::Completion)));
} else {
updateStatusBar();
}
- QMetaObject::invokeMethod(this, "restoreViewState", Qt::QueuedConnection);
// Enable the 'File'->'Create New...' menu only if the directory
// supports writing.
delayedStatusBarUpdate();
}
-void DolphinViewContainer::restoreViewState()
-{
- QByteArray locationState = m_urlNavigator->locationState();
- QDataStream stream(&locationState, QIODevice::ReadOnly);
- m_view->restoreState(stream);
-}
-
void DolphinViewContainer::activate()
{
setActive(true);
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->locationUrl(index - 1);
- m_view->activateItem(url);
+ QByteArray locationState = m_urlNavigator->locationState();
+
+ if (!locationState.isEmpty()) {
+ QDataStream stream(&locationState, QIODevice::ReadOnly);
+ m_view->restoreState(stream);
}
}