- bool addTrash = capabilities.isLocal() && supportsMoving;
- bool addDel = false;
- if (supportsDeleting) {
- if ( !item.isLocalFile() )
- addDel = true;
- else if (QApplication::keyboardModifiers() & Qt::ShiftModifier) {
- addTrash = false;
- addDel = true;
- }
- else {
- KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
- KConfigGroup configGroup(globalConfig, "KDE");
- addDel = configGroup.readEntry("ShowDeleteCommand", false);
- }
- }
-
- if (!addTrash || !addDel) {
- if (!m_removeAction) {
- m_removeAction = new DolphinRemoveAction(this, actionCollection());
- }
- editActions.append(m_removeAction);
- m_removeAction->update();
- } else {
- delete m_removeAction;
- m_removeAction = 0;
- editActions.append(actionCollection()->action("move_to_trash"));
- editActions.append(actionCollection()->action("delete"));
- }
-