X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/402a17bf1f59d91177c6fa4ec7eb8fb7c3ab77e0..60d555fa55f025f3ecaa82cf95f012cbbbeb8ddc:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index b2342c3b0..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); @@ -402,6 +404,10 @@ void DolphinViewContainer::restoreView(const KUrl& url) const QString browser = config.readEntry("BrowserApplication"); if (!browser.isEmpty()) { app = browser; + if (app.startsWith('!')) { + // a literal command has been configured, remove the '!' prefix + app = app.mid(1); + } } } else { showErrorMessage(i18nc("@info:status", @@ -448,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();