Show the Delete context menu entry even when disabled

Summary:
This is consistent with the HIG, and the 'Rename' entry in
the context menu already behaves like that.

Test Plan:
Right click on /home. The context menu should contained
the 'Delete' entry, but it should be disabled.

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, romangg, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17012
This commit is contained in:
Thomas Surrel 2018-11-19 14:08:19 +01:00
parent 1f162f181c
commit 1340e98548

View file

@ -421,7 +421,6 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
addAction(collection->action(KStandardAction::name(KStandardAction::RenameFile))); addAction(collection->action(KStandardAction::name(KStandardAction::RenameFile)));
// Insert 'Move to Trash' and/or 'Delete' // Insert 'Move to Trash' and/or 'Delete'
if (properties.supportsDeleting()) {
const bool showDeleteAction = (KSharedConfig::openConfig()->group("KDE").readEntry("ShowDeleteCommand", false) || const bool showDeleteAction = (KSharedConfig::openConfig()->group("KDE").readEntry("ShowDeleteCommand", false) ||
!properties.isLocal()); !properties.isLocal());
const bool showMoveToTrashAction = (properties.isLocal() && const bool showMoveToTrashAction = (properties.isLocal() &&
@ -442,7 +441,6 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
m_removeAction->update(); m_removeAction->update();
} }
} }
}
void DolphinContextMenu::addShowMenuBarAction() void DolphinContextMenu::addShowMenuBarAction()
{ {