]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Make the "Create New..." menu in the "item context menu" work again
authorFrank Reininghaus <frank78ac@googlemail.com>
Wed, 20 Nov 2013 23:41:23 +0000 (00:41 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Wed, 20 Nov 2013 23:41:33 +0000 (00:41 +0100)
Since https://git.reviewboard.kde.org/r/111989/, the "Create New..."
menu in the context menu that appears when right-clicking a folder was
not a child of the DolphinMainWindow any more, but of the context menu
itself. This is the reason why the dialog that asks for a file name
when choosing one of the "Create New..." options disappeared
immediately.

This patch makes sure that the main window is the parent of the
"Create New..." menu again.

BUG: 327783
REVIEW: 113930

src/dolphincontextmenu.cpp

index 7d11c3bcdb48d724c68d0c045169119b3fd867aa..f295de708f939c88917a26c67944a085eb6cbf25 100644 (file)
@@ -196,7 +196,7 @@ void DolphinContextMenu::openItemContextMenu()
     if (m_selectedItems.count() == 1) {
         if (m_fileInfo.isDir()) {
             // setup 'Create New' menu
-            DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), this);
+            DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), m_mainWindow);
             const DolphinView* view = m_mainWindow->activeViewContainer()->view();
             newFileMenu->setViewShowsHiddenFiles(view->hiddenFilesShown());
             newFileMenu->checkUpToDate();