Commit b76cc3f6 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Separate Delete/Move To Trash menu items in context menu

Right now these actions are in a visual group with "Rename" and "Add to
Places" which is silly as those actions have no logical connection
whatsoever to deletion.

This commits moves those items into the section above, putting them in a
more logical place and leaving the Delete/Move To Trash item in its own
section.

BUG: 429256
FIXED-IN: 21.04
parent b03607b2
......@@ -271,15 +271,6 @@ void DolphinContextMenu::openItemContextMenu()
insertDefaultItemActions(selectedItemsProps);
// insert 'Add to Places' entry if appropriate
if (m_selectedItems.count() == 1) {
if (m_fileInfo.isDir()) {
if (!placeExists(m_fileInfo.url())) {
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("add_to_places")));
}
}
}
addSeparator();
fileItemActions.addServiceActionsTo(this);
......@@ -383,11 +374,20 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
}
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("duplicate")));
addSeparator();
// Insert 'Rename'
addAction(collection->action(KStandardAction::name(KStandardAction::RenameFile)));
// insert 'Add to Places' entry if appropriate
if (m_selectedItems.count() == 1) {
if (m_fileInfo.isDir()) {
if (!placeExists(m_fileInfo.url())) {
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("add_to_places")));
}
}
}
addSeparator();
// Insert 'Move to Trash' and/or 'Delete'
const bool showDeleteAction = (KSharedConfig::openConfig()->group("KDE").readEntry("ShowDeleteCommand", false) ||
!properties.isLocal());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment