m_viewMode = new QComboBox(propsBox);
m_viewMode->addItem(KIcon("view-icon"), i18n("Icons"));
m_viewMode->addItem(KIcon("fileview-text"), i18n("Details"));
+ m_viewMode->addItem(KIcon("view-tree"), i18n("Column"));
const int index = static_cast<int>(m_viewProps->viewMode());
m_viewMode->setCurrentIndex(index);
QLabel* sortingLabel = new QLabel(i18n("Sorting:"), propsBox);
- m_sorting = new QComboBox(propsBox);
+ QWidget* sortingBox = new QWidget(propsBox);
+
+ m_sortOrder = new QComboBox(sortingBox);
+ m_sortOrder->addItem(i18n("Ascending"));
+ m_sortOrder->addItem(i18n("Descending"));
+ const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::AscendingOrder) ? 0 : 1;
+ m_sortOrder->setCurrentIndex(sortOrderIdx);
+
+ m_sorting = new QComboBox(sortingBox);
m_sorting->addItem("By Name");
m_sorting->addItem("By Size");
m_sorting->addItem("By Date");
m_sorting->addItem("By Group");
m_sorting->setCurrentIndex(m_viewProps->sorting());
- QLabel* sortOrderLabel = new QLabel(i18n("Sort order:"), propsBox);
- m_sortOrder = new QComboBox(propsBox);
- m_sortOrder->addItem(i18n("Ascending"));
- m_sortOrder->addItem(i18n("Descending"));
- const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1;
- m_sortOrder->setCurrentIndex(sortOrderIdx);
+ QHBoxLayout* sortingLayout = new QHBoxLayout();
+ sortingLayout->setMargin(0);
+ sortingLayout->addWidget(m_sortOrder);
+ sortingLayout->addWidget(m_sorting);
+ sortingBox->setLayout(sortingLayout);
QLabel* additionalInfoLabel = new QLabel(i18n("Additional information:"), propsBox);
m_additionalInfo = new QComboBox(propsBox);
QGridLayout* propsBoxLayout = new QGridLayout(propsBox);
propsBoxLayout->addWidget(viewModeLabel, 0, 0);
propsBoxLayout->addWidget(m_viewMode, 0, 1);
- propsBoxLayout->addWidget(m_sorting, 1, 1);
propsBoxLayout->addWidget(sortingLabel, 1, 0);
- propsBoxLayout->addWidget(m_sorting, 1, 1);
- propsBoxLayout->addWidget(sortOrderLabel, 2, 0);
- propsBoxLayout->addWidget(m_sortOrder, 2, 1);
- propsBoxLayout->addWidget(additionalInfoLabel, 3, 0);
- propsBoxLayout->addWidget(m_additionalInfo, 3, 1);
- propsBoxLayout->addWidget(m_showPreview, 4, 0);
- propsBoxLayout->addWidget(m_showHiddenFiles, 5, 0);
+ propsBoxLayout->addWidget(sortingBox, 1, 1);
+ propsBoxLayout->addWidget(additionalInfoLabel, 2, 0);
+ propsBoxLayout->addWidget(m_additionalInfo, 2, 1);
+ propsBoxLayout->addWidget(m_showPreview, 3, 0);
+ propsBoxLayout->addWidget(m_showHiddenFiles, 4, 0);
topLayout->addWidget(propsBox);
// Only show the following settings if the view properties are remembered
// for each directory:
if (!useGlobalViewProps) {
- // create 'Apply view properties to:' group
- QGroupBox* applyBox = new QGroupBox(i18n("Apply view properties to:"), main);
+ // create 'Apply View Properties To' group
+ QGroupBox* applyBox = new QGroupBox(i18n("Apply View Properties To"), main);
m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), applyBox);
m_applyToCurrentFolder->setChecked(true);
void ViewPropertiesDialog::slotViewModeChanged(int index)
{
- Q_ASSERT((index >= 0) && (index <= 1));
m_viewProps->setViewMode(static_cast<DolphinView::Mode>(index));
m_isDirty = true;
void ViewPropertiesDialog::slotSortOrderChanged(int index)
{
- Qt::SortOrder sortOrder = (index == 0) ? Qt::Ascending : Qt::Descending;
+ Qt::SortOrder sortOrder = (index == 0) ? Qt::AscendingOrder : Qt::DescendingOrder;
m_viewProps->setSortOrder(sortOrder);
m_isDirty = true;
}