┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-03-17 20:55:26 +0000
committerPeter Penz <[email protected]>2009-03-17 20:55:26 +0000
commit396cb90a73df3e2797b1bf7553098c2f06837e10 (patch)
tree8c1c5e2a78f6a6905c230fdbc0523c474c90b611 /src/dolphinpart.cpp
parentb8c2f5377772c618b2b032bcd67cd32045c97fc9 (diff)
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: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=940628
Diffstat (limited to 'src/dolphinpart.cpp')
-rw-r--r--src/dolphinpart.cpp3
1 files changed, 3 insertions, 0 deletions
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 <konq_fileitemcapabilities.h>
#include <konq_operations.h>
@@ -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()));