// The context menu either accesses the URLs of the selected items
// or the items itself. To increase the performance both lists are cached.
const DolphinView* view = m_mainWindow->activeViewContainer()->view();
- m_selectedUrls = view->selectedUrls();
m_selectedItems = view->selectedItems();
+ foreach (const KFileItem &item, m_selectedItems) {
+ m_selectedUrls.append(item.url());
+ }
if (m_keyInfo != 0) {
if (m_keyInfo->isKeyPressed(Qt::Key_Shift) || m_keyInfo->isKeyLatched(Qt::Key_Shift)) {
{
const KActionCollection* collection = m_mainWindow->actionCollection();
const bool moveToTrash = capabilities().isLocal() && !m_shiftPressed;
- const QAction* action = moveToTrash ? collection->action("move_to_trash") : collection->action("delete");
- m_removeAction->setText(action->text());
+
+ // Using m_removeAction->setText(action->text()) does not apply the &-shortcut.
+ // This is only done until the original action has been shown at least once. To
+ // bypass this issue, the text and &-shortcut is applied manually.
+ const QAction* action = 0;
+ if (moveToTrash) {
+ action = collection->action("move_to_trash");
+ m_removeAction->setText(i18nc("@action:inmenu", "&Move to Trash"));
+ } else {
+ action = collection->action("delete");
+ m_removeAction->setText(i18nc("@action:inmenu", "&Delete"));
+ }
m_removeAction->setIcon(action->icon());
m_removeAction->setShortcuts(action->shortcuts());
}