From e3da86af95dd620f62c1acc245b7bf98769a94fd Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 21 Jan 2008 19:31:07 +0000 Subject: 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 --- src/dolphinview.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index b42f57007..44efbc438 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -126,14 +126,12 @@ public: * @param proxyModel Used proxy model which specifies the sorting. The * model is not owned by the view and won't get * deleted. - * @param actionCollection Action collection which contains the menu actions. */ DolphinView(QWidget* parent, const KUrl& url, KDirLister* dirLister, DolphinModel* dolphinModel, - DolphinSortFilterProxyModel* proxyModel, - KActionCollection* actionCollection); + DolphinSortFilterProxyModel* proxyModel); virtual ~DolphinView(); @@ -362,6 +360,12 @@ public: */ static KAction* createDeleteAction(KActionCollection* collection); + /** + * Creates the "new directory" action. + * This code is here to share it between the mainwindow and the part + */ + static KAction* createNewDirAction(KActionCollection* collection); + /** * Returns the action name corresponding to the current view mode */ @@ -594,12 +598,6 @@ private slots: */ void slotDeleteFileFinished(KJob* job); - /** - * Opens the dialog for creating a directory. Is connected - * with the key shortcut for "new directory" (F10). - */ - void createDir(); - private: void loadDirectory(const KUrl& url, bool reload = false); -- cgit v1.3.1