diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -457,6 +457,14 @@ m_newFileMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->hiddenFilesShown()); m_newFileMenu->checkUpToDate(); m_newFileMenu->setPopupFiles(activeViewContainer()->url()); + + // If we're in the trash, disable all the 'create new' items + // TODO: remove this once https://phabricator.kde.org/T8234 is implemented + const bool inTheTrash = m_activeViewContainer->view()->url().scheme() == QLatin1String("trash"); + const auto actions = m_newFileMenu->menu()->actions(); + for (auto menuItem : actions) { + menuItem->setEnabled(!inTheTrash); + } } void DolphinMainWindow::createDirectory()