From 1daef0dc52a18b03e2bc5b4ce85944356b6b5da3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 21 Jan 2008 14:16:31 +0000 Subject: Cleanup: let the DolphinView be aware about the used action collection. This will allow us cleaning up some code in DolphinMainWindow and will make it easier sharing code with DolphinPart. CCMAIL: faure@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=764347 --- src/dolphinpart.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/dolphinpart.cpp') diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index d26f14061..235f176cd 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -70,7 +70,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi KUrl(), m_dirLister, m_dolphinModel, - m_proxyModel); + m_proxyModel, + actionCollection()); setWidget(m_view); setXMLFile("dolphinpart.rc"); @@ -144,14 +145,6 @@ void DolphinPart::createActions() propertiesAction->setShortcut(Qt::ALT+Qt::Key_Return); connect(propertiesAction, SIGNAL(triggered()), SLOT(slotProperties())); - // This action doesn't appear in the GUI, it's for the shortcut only. - // KNewMenu takes care of the GUI stuff. - KAction* newDirAction = actionCollection()->addAction( "create_dir" ); - newDirAction->setText( i18n("Create Folder..." ) ); - connect(newDirAction, SIGNAL(triggered()), SLOT(slotNewDir())); - newDirAction->setShortcut(Qt::Key_F10); - widget()->addAction(newDirAction); - // Go menu QActionGroup* goActionGroup = new QActionGroup(this); @@ -414,11 +407,6 @@ void DolphinPart::slotTrashActivated(Qt::MouseButtons, Qt::KeyboardModifiers mod m_view->trashSelectedItems(); } -void DolphinPart::slotNewDir() -{ - KonqOperations::newDir(widget(), url()); -} - void DolphinPart::slotEditMimeType() { const KFileItemList items = m_view->selectedItems(); -- cgit v1.3