diff options
| author | Peter Penz <[email protected]> | 2007-06-07 21:10:48 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-06-07 21:10:48 +0000 |
| commit | be9746e87bb6a42e641dbf36c528a60fb564420a (patch) | |
| tree | 678e044f977b702685aa7267957b797f623efbb3 /src/dolphincontextmenu.cpp | |
| parent | 5de9950182b5a1b0b99e4cc51e48d4d83b6bef24 (diff) | |
First big step to make it possible that the DolphinView can be embedded as KPart into Konqueror (discussed with David Faure). A lot of refactoring of the DolphinView has been done:
- The DolphinView does not contain the URL navigator, the filterbar and the statusbar anymore. Those widgets have been moved to DolphinViewContainer.
- The DolphinView does not contain any reference to the main window anymore.
Currently there are some minor regressions (the statusbar shows less informations, renaming has been deactivated), but they will get fixed during the next days. Also still a lot of interface cleanups must be done, but let's just do it step by step...
svn path=/trunk/KDE/kdebase/apps/; revision=672692
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 468b7d69d..ce14c37ef 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -23,6 +23,7 @@ #include "dolphinmainwindow.h" #include "dolphinsettings.h" #include "dolphinview.h" +#include "dolphinviewcontainer.h" #include <kactioncollection.h> #include <kfileplacesmodel.h> @@ -57,7 +58,7 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent, { // The context menu either accesses the URLs of the selected items // or the items itself. To increase the performance both lists are cached. - DolphinView* view = m_mainWindow->activeView(); + DolphinView* view = m_mainWindow->activeViewContainer()->view(); m_selectedUrls = view->selectedUrls(); m_selectedItems = view->selectedItems(); } @@ -242,11 +243,11 @@ void DolphinContextMenu::openViewportContextMenu() QAction* activatedAction = popup->exec(QCursor::pos()); if (activatedAction == propertiesAction) { - const KUrl& url = m_mainWindow->activeView()->url(); + const KUrl& url = m_mainWindow->activeViewContainer()->url(); KPropertiesDialog dialog(url); dialog.exec(); } else if (activatedAction == bookmarkAction) { - const KUrl& url = m_mainWindow->activeView()->url(); + const KUrl& url = m_mainWindow->activeViewContainer()->url(); if (url.isValid()) { DolphinSettings::instance().placesModel()->addPlace(url.fileName(), url); } @@ -278,7 +279,7 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup) const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals); const KConfigGroup kdeConfig(globalConfig, "KDE"); bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false); - const KUrl& url = m_mainWindow->activeView()->url(); + const KUrl& url = m_mainWindow->activeViewContainer()->url(); if (url.isLocalFile()) { QAction* moveToTrashAction = collection->action("move_to_trash"); popup->addAction(moveToTrashAction); |
