Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d75a37b5 authored by Nate Graham's avatar Nate Graham 🔩

[Folder View] make file context menu consistent with Dolphin's

Summary:
BUG: 401652
FIXED-IN: 5.15.0

Test Plan:
Before: {F6464047}

After: {F6460232}

It matches Dolphin: {F6460009}

Reviewers: #plasma, hein, #vdg, ndavis

Reviewed By: #plasma, hein, #vdg, ndavis

Subscribers: ndavis, mart, janpr, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17393
parent d4bde172
......@@ -1783,11 +1783,14 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
KFileItemListProperties itemProperties(items);
// Start adding the actions:
menu->addAction(m_actionCollection.action(QStringLiteral("open")));
// "Open" and "Open with" actions
m_fileItemActions->setItemListProperties(itemProperties);
m_fileItemActions->addOpenWithActionsTo(menu);
menu->addSeparator();
menu->addAction(m_actionCollection.action(QStringLiteral("cut")));
menu->addAction(m_actionCollection.action(QStringLiteral("copy")));
menu->addAction(m_actionCollection.action(QStringLiteral("pasteto")));
menu->addAction(m_actionCollection.action(QStringLiteral("paste")));
menu->addSeparator();
menu->addAction(m_actionCollection.action(QStringLiteral("rename")));
menu->addAction(m_actionCollection.action(QStringLiteral("restoreFromTrash")));
......@@ -1805,9 +1808,8 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
deleteAction->setVisible(showDeleteCommand || !trashAction->isVisible());
// "Open with" actions
m_fileItemActions->setItemListProperties(itemProperties);
m_fileItemActions->addOpenWithActionsTo(menu);
menu->addSeparator();
// Service actions
m_fileItemActions->addServiceActionsTo(menu);
menu->addSeparator();
......@@ -1825,7 +1827,9 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
// Properties
if (KPropertiesDialog::canDisplay(items)) {
menu->addSeparator();
QAction *act = new QAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("&Properties"), menu);
act->setShortcuts({Qt::ALT + Qt::Key_Return, Qt::ALT + Qt::Key_Enter});
QObject::connect(act, &QAction::triggered, this, &FolderModel::openPropertiesDialog);
menu->addAction(act);
}
......
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