]> cloud.milkyroute.net Git - dolphin.git/commitdiff
don't connect each sidebar page with all available signals per default
authorPeter Penz <peter.penz19@gmail.com>
Wed, 2 May 2007 05:15:03 +0000 (05:15 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Wed, 2 May 2007 05:15:03 +0000 (05:15 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=660258

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 6eb4fa94e065c6aeeceee1a7422ac4a71448844a..9223dc19fae2e8e80afa8f953599b5f3894776f6 100644 (file)
@@ -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)
index 4f850339e85513ea022be1395e930e05dee92820..e1de7f808e5ba67c35157e3a48d8e56e2cb916eb 100644 (file)
@@ -422,11 +422,6 @@ private:
      */
     void connectViewSignals(int viewIndex);
 
-    /**
-     * Helper function to connect all signal/slots of the given \sidebar.
-     */
-    void connectSidebarPage(SidebarPage* sidebar);
-
 private:
     /**
      * DolphinMainWindowsupports only one or two views, which