+void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
+{
+ connect(container, SIGNAL(showFilterBarChanged(bool)),
+ this, SLOT(updateFilterBarAction(bool)));
+ connect(container, SIGNAL(writeStateChanged(bool)),
+ this, SLOT(slotWriteStateChanged(bool)));
+
+ DolphinView* view = container->view();
+ connect(view, SIGNAL(selectionChanged(KFileItemList)),
+ this, SLOT(slotSelectionChanged(KFileItemList)));
+ connect(view, SIGNAL(requestItemInfo(KFileItem)),
+ this, SLOT(slotRequestItemInfo(KFileItem)));
+ connect(view, SIGNAL(activated()),
+ this, SLOT(toggleActiveView()));
+ connect(view, SIGNAL(tabRequested(const KUrl&)),
+ this, SLOT(openNewTab(const KUrl&)));
+ connect(view, SIGNAL(requestContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)),
+ this, SLOT(openContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)));
+ connect(view, SIGNAL(startedPathLoading(KUrl)),
+ this, SLOT(enableStopAction()));
+ connect(view, SIGNAL(finishedPathLoading(KUrl)),
+ this, SLOT(disableStopAction()));
+
+ const KUrlNavigator* navigator = container->urlNavigator();
+ connect(navigator, SIGNAL(urlChanged(const KUrl&)),
+ this, SLOT(changeUrl(const KUrl&)));
+ connect(navigator, SIGNAL(historyChanged()),
+ this, SLOT(updateHistory()));
+ connect(navigator, SIGNAL(editableStateChanged(bool)),
+ this, SLOT(slotEditableStateChanged(bool)));
+ connect(navigator, SIGNAL(tabRequested(const KUrl&)),
+ this, SLOT(openNewTab(KUrl)));
+}
+
+void DolphinMainWindow::updateSplitAction()
+{
+ QAction* splitAction = actionCollection()->action("split_view");
+ if (m_viewTab[m_tabIndex].secondaryView != 0) {
+ if (m_activeViewContainer == m_viewTab[m_tabIndex].secondaryView) {
+ splitAction->setText(i18nc("@action:intoolbar Close right view", "Close"));
+ splitAction->setToolTip(i18nc("@info", "Close right view"));
+ splitAction->setIcon(KIcon("view-right-close"));
+ } else {
+ splitAction->setText(i18nc("@action:intoolbar Close left view", "Close"));
+ splitAction->setToolTip(i18nc("@info", "Close left view"));
+ splitAction->setIcon(KIcon("view-left-close"));
+ }
+ } else {
+ splitAction->setText(i18nc("@action:intoolbar Split view", "Split"));
+ splitAction->setToolTip(i18nc("@info", "Split view"));
+ splitAction->setIcon(KIcon("view-right-new"));
+ }
+}