diff options
| author | Holger Freyther <[email protected]> | 2006-11-29 00:02:19 +0000 |
|---|---|---|
| committer | Holger Freyther <[email protected]> | 2006-11-29 00:02:19 +0000 |
| commit | f31a541925033c2ef5e27b85c099d47791b50121 (patch) | |
| tree | 11cc728aa7d247ca5b075776c438be0f381be765 /src/infosidebarpage.cpp | |
| parent | 68e81f7280c810e26cabf6cd2897b9dc8466f458 (diff) | |
Make it (almost) possible to have more than one Dolphin KMainWindow
Create a DolphinApplication, holding DolphinMainWindows and update
the code to use the DolphinView to get the MainWindow, or get a ptr
to the MainWindow directly. Or if all windows are effected go through
the DolphinApplication to update every mainwindow.
The UndowManager and ProgressIndicator have a rather strange relationship
and will need some more attention but as UndoManager will be killed
anyway I have skipped this.
More cleanup, debugging and thinking is needed.
svn path=/trunk/playground/utils/dolphin/; revision=608945
Diffstat (limited to 'src/infosidebarpage.cpp')
| -rw-r--r-- | src/infosidebarpage.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index bf3d5f4fc..296be528b 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -47,12 +47,12 @@ #include <kfilemetainfo.h> #include <kvbox.h> -#include "dolphin.h" +#include "dolphinmainwindow.h" #include "pixmapviewer.h" #include "dolphinsettings.h" -InfoSidebarPage::InfoSidebarPage(QWidget* parent) : - SidebarPage(parent), +InfoSidebarPage::InfoSidebarPage(DolphinMainWindow* mainWindow, QWidget* parent) : + SidebarPage(mainWindow, parent), m_multipleSelection(false), m_pendingPreview(false), m_timer(0), @@ -111,7 +111,7 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : layout->addWidget(m_actionBox); layout->addWidget(dummy); - connect(&Dolphin::mainWin(), SIGNAL(selectionChanged()), + connect(mainWindow, SIGNAL(selectionChanged()), this, SLOT(showItemInfo())); connectToActiveView(); @@ -153,7 +153,7 @@ void InfoSidebarPage::showItemInfo() m_multipleSelection = false; // show the preview... - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); const KFileItemList* selectedItems = view->selectedItems(); if ((selectedItems != 0) && selectedItems->count() > 1) { m_multipleSelection = true; @@ -218,7 +218,7 @@ void InfoSidebarPage::gotPreview(const KFileItem* /* item */, void InfoSidebarPage::startService(int index) { - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); if (view->hasSelection()) { KUrl::List selectedUrls = view->selectedUrls(); KDEDesktopMimeType::executeService(selectedUrls, m_actionsVector[index]); @@ -232,7 +232,7 @@ void InfoSidebarPage::connectToActiveView() { cancelRequest(); - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); connect(view, SIGNAL(signalRequestItemInfo(const KUrl&)), this, SLOT(requestDelayedItemInfo(const KUrl&))); connect(view, SIGNAL(signalUrlChanged(const KUrl&)), @@ -279,7 +279,7 @@ void InfoSidebarPage::createMetaInfo() // The methods beginInfoLines(), addInfoLine() and endInfoLines() // take care of this. beginInfoLines(); - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); if (!view->hasSelection()) { KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl); fileItem.refresh(); @@ -430,7 +430,7 @@ void InfoSidebarPage::insertActions() // by the given Url 'url' is created and added to the list. KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl); KFileItemList localList; - const KFileItemList* itemList = Dolphin::mainWin().activeView()->selectedItems(); + const KFileItemList* itemList = mainWindow()->activeView()->selectedItems(); if ((itemList == 0) || itemList->isEmpty()) { fileItem.refresh(); localList.append(&fileItem); |
