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/bookmarkssidebarpage.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/bookmarkssidebarpage.cpp')
| -rw-r--r-- | src/bookmarkssidebarpage.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bookmarkssidebarpage.cpp b/src/bookmarkssidebarpage.cpp index b3861aa2f..7eced5a01 100644 --- a/src/bookmarkssidebarpage.cpp +++ b/src/bookmarkssidebarpage.cpp @@ -36,12 +36,11 @@ #include <klocale.h> #include "dolphinsettings.h" -#include "dolphin.h" -#include "dolphinview.h" +#include "dolphinmainwindow.h" #include "editbookmarkdialog.h" -BookmarksSidebarPage::BookmarksSidebarPage(QWidget* parent) : - SidebarPage(parent) +BookmarksSidebarPage::BookmarksSidebarPage(DolphinMainWindow* mainWindow, QWidget* parent) : + SidebarPage(mainWindow, parent) { Q3VBoxLayout* layout = new Q3VBoxLayout(this); m_bookmarksList = new BookmarksListBox(this); @@ -98,7 +97,7 @@ void BookmarksSidebarPage::slotMouseButtonClicked(int button, Q3ListBoxItem* ite const int index = m_bookmarksList->index(item); KBookmark bookmark = DolphinSettings::instance().bookmark(index); - Dolphin::mainWin().activeView()->setUrl(bookmark.url()); + mainWindow()->activeView()->setUrl(bookmark.url()); } void BookmarksSidebarPage::slotContextMenuRequested(Q3ListBoxItem* item, @@ -187,7 +186,7 @@ void BookmarksSidebarPage::slotContextMenuRequested(Q3ListBoxItem* item, delete popup; popup = 0; - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); adjustSelection(view->url()); } @@ -241,7 +240,7 @@ void BookmarksSidebarPage::slotUrlChanged(const KUrl& url) void BookmarksSidebarPage::connectToActiveView() { - DolphinView* view = Dolphin::mainWin().activeView(); + DolphinView* view = mainWindow()->activeView(); adjustSelection(view->url()); connect(view, SIGNAL(signalUrlChanged(const KUrl&)), this, SLOT(slotUrlChanged(const KUrl&))); |
