┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-06-08 15:20:19 +0000
committerPeter Penz <[email protected]>2008-06-08 15:20:19 +0000
commitffe9bbacd9a27f3a2a8c349504a65e1c89e64503 (patch)
treee3cdf55917f3b7e3790468413167f1375227fa77 /src/dolphinmainwindow.cpp
parenteeea9662b7963c6cbecdcc03ef650c4b6b860640 (diff)
disable the paste action if no writing is supported for the paste-destination
BUG: 161639 svn path=/trunk/KDE/kdebase/apps/; revision=818445
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp10
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()