X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/cba24825c973ff422a84a71563ec7bc22c340088..a4ef4bbfdebad708e4b3c772c1ce3e236a4da145:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index de4c6070d..66097358f 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +46,7 @@ #include "dolphinpart_ext.h" #endif +#include "dolphinnewfilemenu.h" #include "views/dolphinview.h" #include "views/dolphinviewactionhandler.h" #include "views/dolphinnewfilemenuobserver.h" @@ -79,6 +79,9 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL m_view->setTabsForFilesEnabled(true); setWidget(m_view); + connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)), + this, SLOT(slotErrorMessage(QString))); + connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed())); connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int))); connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString))); @@ -160,16 +163,14 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL DolphinPart::~DolphinPart() { - DolphinNewFileMenuObserver::instance().detach(m_newFileMenu); } void DolphinPart::createActions() { // Edit menu - m_newFileMenu = new KNewFileMenu(actionCollection(), "new_menu", this); + m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this); m_newFileMenu->setParentWidget(widget()); - DolphinNewFileMenuObserver::instance().attach(m_newFileMenu); connect(m_newFileMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(updateNewMenu()));