disable the paste action if no writing is supported for the paste-destination

BUG: 161639

svn path=/trunk/KDE/kdebase/apps/; revision=818445
This commit is contained in:
Peter Penz 2008-06-08 15:20:19 +00:00
parent 894919c15c
commit 491c917d5a

View file

@ -458,6 +458,16 @@ void DolphinMainWindow::updatePasteAction()
QPair<bool, QString> pasteInfo = m_activeViewContainer->view()->pasteInfo();
pasteAction->setEnabled(pasteInfo.first);
pasteAction->setText(pasteInfo.second);
if (pasteAction->isEnabled()) {
// disable the paste action if no writing is supported
const KUrl& url = m_activeViewContainer->view()->url();
KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
KFileItemList list;
list.append(item);
KonqFileItemCapabilities capabilities(list);
pasteAction->setEnabled(capabilities.supportsWriting());
}
}
void DolphinMainWindow::selectAll()