X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5a647117abf1fd6ab7ef26cfa3f54aee96f27fce..68520f55f0b6b2fc450f646477bf3c535324aa2b:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index e879f67fc..375bd3ea2 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -850,6 +850,12 @@ void DolphinView::slotItemMiddleClicked(int index) void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos) { + // Force emit of a selection changed signal before we request the + // context menu, to update the edit-actions first. (See Bug 294013) + if (m_selectionChangedTimer->isActive()) { + emitSelectionChangedSignal(); + } + const KFileItem item = m_model->fileItem(index); emit requestContextMenu(pos.toPoint(), item, url(), QList()); } @@ -1048,7 +1054,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even if (op && destUrl == url()) { // Mark the dropped urls as selected. m_clearSelectionBeforeSelectingNewItems = true; - connect(op, SIGNAL(urlPasted(KUrl)), this, SLOT(slotUrlPasted(KUrl))); + connect(op, SIGNAL(aboutToCreate(KUrl::List)), this, SLOT(slotAboutToCreate(KUrl::List))); } setActive(true); @@ -1093,7 +1099,7 @@ void DolphinView::slotAboutToCreate(const KUrl::List& urls) markUrlAsCurrent(urls.first()); m_markFirstNewlySelectedItemAsCurrent = false; } - m_selectedUrls << urls; + m_selectedUrls << KDirModel::simplifiedUrlList(urls); } } @@ -1248,10 +1254,13 @@ KUrl DolphinView::openItemAsFolderUrl(const KFileItem& item, const bool browseTh } if (mimetype == QLatin1String("application/x-desktop")) { - // Redirect to the URL in Type=Link desktop files + // Redirect to the URL in Type=Link desktop files, unless it is a http(s) URL. KDesktopFile desktopFile(url.toLocalFile()); if (desktopFile.hasLinkType()) { - return desktopFile.readUrl(); + const QString linkUrl = desktopFile.readUrl(); + if (!linkUrl.startsWith(QLatin1String("http"))) { + return linkUrl; + } } } } @@ -1657,7 +1666,7 @@ QMimeData* DolphinView::selectionMimeData() const void DolphinView::updateWritableState() { const bool wasFolderWritable = m_isFolderWritable; - m_isFolderWritable = true; + m_isFolderWritable = false; const KFileItem item = m_model->rootItem(); if (!item.isNull()) {