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<QAction*>());
}
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);
markUrlAsCurrent(urls.first());
m_markFirstNewlySelectedItemAsCurrent = false;
}
- m_selectedUrls << urls;
+ m_selectedUrls << KDirModel::simplifiedUrlList(urls);
}
}
}
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;
+ }
}
}
}
void DolphinView::updateWritableState()
{
const bool wasFolderWritable = m_isFolderWritable;
- m_isFolderWritable = true;
+ m_isFolderWritable = false;
const KFileItem item = m_model->rootItem();
if (!item.isNull()) {