X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/55db38d5ecc1f13e17fecd7f3a5ea24421080b77..27e3907a3daf9a63d05c00a0ff746de6cfdf2bdf:/src/dolphincontextmenu.cpp diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index ca561b5c7..d32d35dd3 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -162,8 +162,7 @@ void DolphinContextMenu::openTrashItemContextMenu() Q_ASSERT(m_context & TrashContext); Q_ASSERT(m_context & ItemContext); - QAction* restoreAction = new QAction(i18nc("@action:inmenu", "Restore"), m_mainWindow); - restoreAction->setShortcut(Qt::CTRL + Qt::Key_R); + QAction* restoreAction = new QAction(QIcon::fromTheme("restoration"), i18nc("@action:inmenu", "Restore"), m_mainWindow); addAction(restoreAction); QAction* deleteAction = m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)); @@ -352,7 +351,12 @@ void DolphinContextMenu::openViewportContextMenu() KFileItemActions fileItemActions; fileItemActions.setParentWidget(m_mainWindow); fileItemActions.setItemListProperties(baseUrlProperties); - addOpenWithActions(fileItemActions); + + // Don't show "Open With" menu items if the current dir is empty, because there's + // generally no app that can do anything interesting with an empty directory + if (view->itemsCount() != 0) { + addOpenWithActions(fileItemActions); + } // Insert 'New Window' and 'New Tab' entries. Don't use "open_in_new_window" and // "open_in_new_tab" here, as the current selection should get ignored.