mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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:
parent
894919c15c
commit
491c917d5a
1 changed files with 10 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue