m_view[SecondaryIdx]->show();
} else {
// remove secondary view
- if (m_activeView == m_view[PrimaryIdx]) {
- m_view[SecondaryIdx]->close();
- m_view[SecondaryIdx]->deleteLater();
- m_view[SecondaryIdx] = 0;
- } else {
- // The secondary view is active, hence from the users point of view
- // the content of the secondary view should be moved to the primary view.
- // From an implementation point of view it is more efficient to close
- // the primary view and exchange the internal pointers afterwards.
- m_view[PrimaryIdx]->close();
- delete m_view[PrimaryIdx];
- m_view[PrimaryIdx] = m_view[SecondaryIdx];
- m_view[SecondaryIdx] = 0;
- }
+ m_view[SecondaryIdx]->close();
+ m_view[SecondaryIdx]->deleteLater();
+ m_view[SecondaryIdx] = 0;
}
setActiveView(m_view[PrimaryIdx]);
emit activeViewChanged();
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
KToggleAction* splitAction = static_cast<KToggleAction*>(actionCollection()->action("split_view"));
- if (settings->splitView()) {
+ const bool isSplit = settings->splitView();
+ if (isSplit) {
splitAction->setChecked(true);
toggleSplitView();
}
+ const KIcon splitIcon(isSplit ? "fileview-join" : "fileview-split");
+ splitAction->setIcon(splitIcon);
updateViewActions();
}
KToggleAction* detailsView = actionCollection()->add<KToggleAction>("details");
detailsView->setText(i18n("Details"));
detailsView->setShortcut(Qt::CTRL | Qt::Key_2);
- detailsView->setIcon(KIcon("fileview-text"));
+ detailsView->setIcon(KIcon("fileview-detailed"));
connect(detailsView, SIGNAL(triggered()), this, SLOT(setDetailsView()));
KToggleAction* columnView = actionCollection()->add<KToggleAction>("columns");
KToggleAction* split = actionCollection()->add<KToggleAction>("split_view");
split->setText(i18n("Split"));
split->setShortcut(Qt::Key_F10);
- split->setIcon(KIcon("view-left-right"));
+ split->setIcon(KIcon("fileview-split"));
connect(split, SIGNAL(triggered()), this, SLOT(toggleSplitView()));
QAction* reload = actionCollection()->addAction("reload");
showHiddenFilesAction->setChecked(m_activeView->showHiddenFiles());
KToggleAction* splitAction = static_cast<KToggleAction*>(actionCollection()->action("split_view"));
- splitAction->setChecked(m_view[SecondaryIdx] != 0);
+ const bool isSplit = (m_view[SecondaryIdx] != 0);
+ splitAction->setChecked(isSplit);
+ const KIcon splitIcon(isSplit ? "fileview-join" : "fileview-split");
+ splitAction->setIcon(splitIcon);
KToggleAction* editableLocactionAction =
static_cast<KToggleAction*>(actionCollection()->action("editable_location"));
QLabel* viewModeLabel = new QLabel(i18n("View mode:"), propsBox);
m_viewMode = new QComboBox(propsBox);
m_viewMode->addItem(KIcon("fileview-icon"), i18n("Icons"));
- m_viewMode->addItem(KIcon("fileview-text"), i18n("Details"));
+ m_viewMode->addItem(KIcon("fileview-detailed"), i18n("Details"));
m_viewMode->addItem(KIcon("fileview-column"), i18n("Column"));
const int index = static_cast<int>(m_viewProps->viewMode());
m_viewMode->setCurrentIndex(index);