X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/1af2241243f4aed24b68ffee048091a55f63a1f2..14f0cd52f61de7539e2d9c751966594708ed0281:/src/dolphincontextmenu.cpp diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 439de930a..d32d35dd3 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -351,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.