X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/13d5441c6932b7ceac46cc23e54a0fd2cc528acf..dbc00fa190b8f8ced61df666266bf836e1f2a1ff:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 8800a1732..de1ae4b4d 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -128,6 +128,8 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) : this, SLOT(slotUrlNavigatorLocationChanged(KUrl))); connect(m_urlNavigator, SIGNAL(historyChanged()), this, SLOT(slotHistoryChanged())); + connect(m_urlNavigator, SIGNAL(returnPressed()), + this, SLOT(slotReturnPressed())); // Initialize status bar m_statusBar = new DolphinStatusBar(this); @@ -156,6 +158,8 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) : this, SLOT(setNameFilter(QString))); connect(m_filterBar, SIGNAL(closeRequest()), this, SLOT(closeFilterBar())); + connect(m_filterBar, SIGNAL(focusViewRequest()), + this, SLOT(requestFocus())); connect(m_view, SIGNAL(urlChanged(KUrl)), m_filterBar, SLOT(clear())); @@ -574,6 +578,8 @@ void DolphinViewContainer::slotUrlNavigatorLocationAboutToBeChanged(const KUrl& void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url) { + slotReturnPressed(); + if (KProtocolManager::supportsListing(url)) { setSearchModeEnabled(isSearchUrl(url)); m_view->setUrl(url); @@ -616,7 +622,8 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url) void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event) { - const QString error = DragAndDropHelper::dropUrls(KFileItem(), destination, event); + QString error; + DragAndDropHelper::dropUrls(KFileItem(), destination, event, error); if (!error.isEmpty()) { showMessage(error, Error); } @@ -657,6 +664,13 @@ void DolphinViewContainer::slotHistoryChanged() } } +void DolphinViewContainer::slotReturnPressed() +{ + if (!GeneralSettings::editableUrl()) { + m_urlNavigator->setUrlEditable(false); + } +} + void DolphinViewContainer::startSearching() { const KUrl url = m_searchBox->urlForSearching();