mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
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
This commit is contained in:
parent
b03607b20b
commit
b76cc3f6fa
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue