diff options
| author | David Faure <[email protected]> | 2008-01-21 19:08:52 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-01-21 19:08:52 +0000 |
| commit | c00478bbc1001d10dcfc04e9b0ea251620837e85 (patch) | |
| tree | 59d238add8e6b240e672bf039fc9ec5fc58c7e1b /src/dolphinmainwindow.cpp | |
| parent | f9aeb825c605ec4ca8b95aae0be1b441ca8ceb91 (diff) | |
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=/branches/KDE/4.0/kdebase/apps/; revision=764429
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 2048de1a5..1da9377c7 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")); |
