┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinviewactionhandler.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-12-29 09:50:17 +0100
committerFrank Reininghaus <[email protected]>2013-12-29 09:50:17 +0100
commit4ddc3cfdde7a52f5880928f7cc8ee8896ded686d (patch)
tree0fa9c1633e00ec713b463ebc3c4828a44c0dc193 /src/views/dolphinviewactionhandler.cpp
parent9866e4826e7a9e7bc80a0fe6142662da52f75e84 (diff)
parent280fa647f15faf8fdd415328d7ff1fd15c621fc9 (diff)
Merge remote-tracking branch 'origin/KDE/4.12'
Diffstat (limited to 'src/views/dolphinviewactionhandler.cpp')
-rw-r--r--src/views/dolphinviewactionhandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp
index 9a9718c33..051174f6d 100644
--- a/src/views/dolphinviewactionhandler.cpp
+++ b/src/views/dolphinviewactionhandler.cpp
@@ -84,6 +84,8 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view)
this, SLOT(slotSortRoleChanged(QByteArray)));
connect(view, SIGNAL(zoomLevelChanged(int,int)),
this, SLOT(slotZoomLevelChanged(int,int)));
+ connect(view, SIGNAL(writeStateChanged(bool)),
+ this, SLOT(slotWriteStateChanged(bool)));
}
DolphinView* DolphinViewActionHandler::currentView()
@@ -99,6 +101,7 @@ void DolphinViewActionHandler::createActions()
newDirAction->setText(i18nc("@action", "Create Folder..."));
newDirAction->setShortcut(Qt::Key_F10);
newDirAction->setIcon(KIcon("folder-new"));
+ newDirAction->setEnabled(false); // Will be enabled in slotWriteStateChanged(bool) if the current URL is writable
connect(newDirAction, SIGNAL(triggered()), this, SIGNAL(createDirectory()));
// File menu
@@ -482,6 +485,11 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown)
showHiddenFilesAction->setChecked(shown);
}
+void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable)
+{
+ m_actionCollection->action("create_dir")->setEnabled(isFolderWritable);
+}
+
KToggleAction* DolphinViewActionHandler::iconsModeAction()
{
KToggleAction* iconsView = m_actionCollection->add<KToggleAction>("icons");