- const KUrl& homeUrl = generalSettings->homeUrl();
- setCaption(homeUrl.fileName());
- m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
- connect(m_actionHandler, SIGNAL(actionBeingHandled()), SLOT(clearStatusBar()));
- ViewProperties props(homeUrl);
- m_viewTab[m_tabIndex].primaryView = new DolphinViewContainer(this,
- m_viewTab[m_tabIndex].splitter,
- homeUrl);
-
- m_activeViewContainer = m_viewTab[m_tabIndex].primaryView;
- connectViewSignals(m_activeViewContainer);
- DolphinView* view = m_activeViewContainer->view();
- view->reload();
- m_activeViewContainer->show();
- m_actionHandler->setCurrentView(view);
-
- m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
- connect(this, SIGNAL(urlChanged(const KUrl&)),
- m_remoteEncoding, SLOT(slotAboutToOpenUrl()));
-
- m_tabBar = new KTabBar(this);
- m_tabBar->setMovable(true);
- m_tabBar->setTabsClosable(true);
- connect(m_tabBar, SIGNAL(currentChanged(int)),
- this, SLOT(setActiveTab(int)));
- connect(m_tabBar, SIGNAL(tabCloseRequested(int)),
- this, SLOT(closeTab(int)));
- connect(m_tabBar, SIGNAL(contextMenu(int, const QPoint&)),
- this, SLOT(openTabContextMenu(int, const QPoint&)));
- connect(m_tabBar, SIGNAL(newTabRequest()),
- this, SLOT(openNewTab()));
- connect(m_tabBar, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)),
- this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&)));
- connect(m_tabBar, SIGNAL(wheelDelta(int)),
- this, SLOT(slotWheelMoved(int)));
- connect(m_tabBar, SIGNAL(mouseMiddleClick(int)),
- this, SLOT(closeTab(int)));
-
- m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open
-
- QWidget* centralWidget = new QWidget(this);
- m_centralWidgetLayout = new QVBoxLayout(centralWidget);
- m_centralWidgetLayout->setSpacing(0);
- m_centralWidgetLayout->setMargin(0);
- m_centralWidgetLayout->addWidget(m_tabBar);
- m_centralWidgetLayout->addWidget(m_viewTab[m_tabIndex].splitter);
-
- setCentralWidget(centralWidget);
- setupDockWidgets();
- emit urlChanged(homeUrl);