diff options
| author | Peter Penz <[email protected]> | 2008-06-08 15:20:19 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-06-08 15:20:19 +0000 |
| commit | ffe9bbacd9a27f3a2a8c349504a65e1c89e64503 (patch) | |
| tree | e3cdf55917f3b7e3790468413167f1375227fa77 | |
| parent | eeea9662b7963c6cbecdcc03ef650c4b6b860640 (diff) | |
disable the paste action if no writing is supported for the paste-destination
BUG: 161639
svn path=/trunk/KDE/kdebase/apps/; revision=818445
| -rw-r--r-- | src/dolphinmainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 57926d33e..07011e7a5 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -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() |
