diff options
| author | Peter Penz <[email protected]> | 2007-05-02 05:15:03 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-02 05:15:03 +0000 |
| commit | 11c836057beab77f76e7a838afde68cc378d7201 (patch) | |
| tree | 50335bd81ac2d4be5b315435999dca92f939779c /src/dolphinmainwindow.cpp | |
| parent | f867a1a3a7bf28b5bd43ff1e358c4bbefcd9fc2f (diff) | |
don't connect each sidebar page with all available signals per default
svn path=/trunk/KDE/kdebase/apps/; revision=660258
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 6eb4fa94e..9223dc19f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1267,13 +1267,7 @@ void DolphinMainWindow::setupActions() void DolphinMainWindow::setupDockWidgets() { - // TODO: there's a lot copy/paste code here. Provide a generic approach - // after the dock concept has been finalized. - // setup "Information" - - // TODO: temporary deactivated info sidebar because of some minor side effects - QDockWidget* infoDock = new QDockWidget(i18n("Information")); infoDock->setObjectName("infoDock"); infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); @@ -1284,7 +1278,8 @@ void DolphinMainWindow::setupDockWidgets() actionCollection()->addAction("show_info_panel", infoDock->toggleViewAction()); addDockWidget(Qt::RightDockWidgetArea, infoDock); - connectSidebarPage(infoWidget); + connect(this, SIGNAL(urlChanged(KUrl)), + infoWidget, SLOT(setUrl(KUrl))); // setup "Tree View" QDockWidget* treeViewDock = new QDockWidget(i18n("Folders")); @@ -1297,7 +1292,14 @@ void DolphinMainWindow::setupDockWidgets() actionCollection()->addAction("show_folders_panel", treeViewDock->toggleViewAction()); addDockWidget(Qt::LeftDockWidgetArea, treeViewDock); - connectSidebarPage(treeWidget); + connect(this, SIGNAL(urlChanged(KUrl)), + treeWidget, SLOT(setUrl(KUrl))); + connect(treeWidget, SIGNAL(changeUrl(KUrl)), + this, SLOT(changeUrl(KUrl))); + connect(treeWidget, SIGNAL(changeSelection(KFileItemList)), + this, SLOT(changeSelection(KFileItemList))); + connect(treeWidget, SIGNAL(urlsDropped(KUrl::List, KUrl)), + this, SLOT(dropUrls(KUrl::List, KUrl))); const bool firstRun = DolphinSettings::instance().generalSettings()->firstRun(); if (firstRun) { @@ -1489,21 +1491,6 @@ void DolphinMainWindow::connectViewSignals(int viewIndex) this, SLOT(slotHistoryChanged())); } -void DolphinMainWindow::connectSidebarPage(SidebarPage* page) -{ - connect(page, SIGNAL(changeUrl(KUrl)), - this, SLOT(changeUrl(KUrl))); - connect(page, SIGNAL(changeSelection(KFileItemList)), - this, SLOT(changeSelection(KFileItemList))); - connect(page, SIGNAL(urlsDropped(KUrl::List, KUrl)), - this, SLOT(dropUrls(KUrl::List, KUrl))); - - connect(this, SIGNAL(urlChanged(KUrl)), - page, SLOT(setUrl(KUrl))); - connect(this, SIGNAL(selectionChanged(KFileItemList)), - page, SLOT(setSelection(KFileItemList))); -} - DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) : KonqUndoManager::UiInterface(mainWin), m_mainWin(mainWin) |
