diff options
| author | David Faure <[email protected]> | 2008-01-21 19:31:07 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-01-21 19:31:07 +0000 |
| commit | e3da86af95dd620f62c1acc245b7bf98769a94fd (patch) | |
| tree | c951926f54ed3b00e050f31ad7da5b7059deeea8 /src/dolphinmainwindow.cpp | |
| parent | 20641620c8cf9187e44b4aea347cbc8d8c96fc25 (diff) | |
forwardport 764429:
Revert the moving of the action to the DolphinView instance, this doesn't work with splitted views.
(Each view would need its own action collection, but then DolphinView would have to become
a KXMLGUIClient, and the GUI would flicker when switching views).
Instead, use the same solution as the other shared actions: static method in DolphinView (for now),
slot in the mainwindow (and for the more complex actions than this one, shared code in DolphinView)
svn path=/trunk/KDE/kdebase/apps/; revision=764436
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e0386467e..8948a53a9 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -60,6 +60,7 @@ #include <kmenubar.h> #include <kmessagebox.h> #include <konqmimedata.h> +#include <konq_operations.h> #include <kpropertiesdialog.h> #include <kprotocolinfo.h> #include <ktoggleaction.h> @@ -422,6 +423,12 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group) } } +void DolphinMainWindow::createDir() +{ + const KUrl& url = m_activeViewContainer->view()->url(); + KonqOperations::newDir(this, url); +} + void DolphinMainWindow::updateNewMenu() { m_newMenu->slotCheckUpToDate(); @@ -985,6 +992,9 @@ void DolphinMainWindow::setupActions() connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateNewMenu())); + KAction* newDirAction = DolphinView::createNewDirAction(actionCollection()); + connect(newDirAction, SIGNAL(triggered()), SLOT(createDir())); + KAction* newWindow = actionCollection()->addAction("new_window"); newWindow->setIcon(KIcon("window-new")); newWindow->setText(i18nc("@action:inmenu File", "New &Window")); |
