diff options
| author | Elvis Angelaccio <[email protected]> | 2017-01-02 14:52:37 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-01-02 14:54:38 +0100 |
| commit | 24ed38d77f4bc6db71ba2608452fa0cd401bddac (patch) | |
| tree | 2089813fb91bad493aa56895a668ef8a93a5febf /src/views | |
| parent | c456c5d528f470ce782a90646eae52951c0f31b9 (diff) | |
Properly disable create_dir action in Trash
`isFolderWritable` is set in DolphinView::updateWritableState() according to
KFileItemListProperties::supportsWriting().
However, `writing=true` does not imply `makedir=true`,
in an ioslave's .protocol file. An example is the trash protocol.
So we need to enable the `create_dir` action only if the protocol is
actually able to create folders.
CCBUG: 332463
REVIEW: 129712
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 858f9299b..5c0b49cd2 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -37,6 +37,7 @@ #include <KSelectAction> #include <KToggleAction> #include <KPropertiesDialog> +#include <KProtocolManager> #include <QIcon> #include "dolphindebug.h" @@ -486,7 +487,8 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable) { - m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable); + m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable && + KProtocolManager::supportsMakeDir(currentView()->url())); } KToggleAction* DolphinViewActionHandler::iconsModeAction() |
