From: Peter Penz Date: Tue, 17 Mar 2009 20:55:26 +0000 (+0000) Subject: Assure that KNewMenu from DolphinPart attachs itself to the DolphinNewMenuObserver... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/396cb90a73df3e2797b1bf7553098c2f06837e10?ds=inline Assure that KNewMenu from DolphinPart attachs itself to the DolphinNewMenuObserver, so that newly created items get selected (DolphinNewMenu - which attachs itself automatically - cannot be used in DolphinPart). CCMAIL: rahman.duran@gmail.com svn path=/trunk/KDE/kdebase/apps/; revision=940628 --- diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 071dce7df..40a62e844 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -23,6 +23,7 @@ #include "dolphinsortfilterproxymodel.h" #include "dolphinview.h" #include "dolphinmodel.h" +#include "dolphinnewmenuobserver.h" #include #include @@ -139,6 +140,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL DolphinPart::~DolphinPart() { + DolphinNewMenuObserver::instance().detach(m_newMenu); delete m_dirLister; } @@ -147,6 +149,7 @@ void DolphinPart::createActions() // Edit menu m_newMenu = new KNewMenu(actionCollection(), widget(), "new_menu"); + DolphinNewMenuObserver::instance().attach(m_newMenu); connect(m_newMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(updateNewMenu()));