diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-08-16 20:22:33 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-08-16 20:22:33 +0200 |
| commit | 804e83f893d04ce4bed150d4e6bd39db2374d878 (patch) | |
| tree | 0968119e2ca88219d531bd8f5640ca273a8bba24 /src/dolphincontextmenu.cpp | |
| parent | b6477f4e653dc6f04a7413cd1c353fb486421526 (diff) | |
Cut the ropes between DolphinMainWindow and DolphinNewFileMenu. Error handling is now done via signals.
REVIEW: 111989
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index f4b469886..3deeb38cd 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -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); + DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), this); const DolphinView* view = m_mainWindow->activeViewContainer()->view(); newFileMenu->setViewShowsHiddenFiles(view->hiddenFilesShown()); newFileMenu->checkUpToDate(); @@ -204,6 +204,7 @@ void DolphinContextMenu::openItemContextMenu() newFileMenu->setEnabled(selectedItemsProps.supportsWriting()); connect(newFileMenu, SIGNAL(fileCreated(KUrl)), newFileMenu, SLOT(deleteLater())); connect(newFileMenu, SIGNAL(directoryCreated(KUrl)), newFileMenu, SLOT(deleteLater())); + connect(newFileMenu, SIGNAL(errorMessage(QString)), this, SIGNAL(errorMessage(QString))); KMenu* menu = newFileMenu->menu(); menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New")); |
