- QLabel* viewModeLabel = new QLabel(i18n("View mode:"), propsBox);
- m_viewMode = new QComboBox(propsBox);
- m_viewMode->addItem(SmallIcon("view_icon"), i18n("Icons"));
- m_viewMode->addItem(SmallIcon("view_text"), i18n("Details"));
- 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);
- m_sorting->addItem("By Name");
- m_sorting->addItem("By Size");
- m_sorting->addItem("By Date");
- m_sorting->addItem("By Permissions");
- m_sorting->addItem("By Owner");
- 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);
-
- m_showPreview = new QCheckBox(i18n("Show preview"), propsBox);
- m_showPreview->setChecked(m_viewProps->showPreview());
-
- m_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsBox);
- m_showHiddenFiles->setChecked(m_viewProps->showHiddenFiles());
-
- 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(m_showPreview, 3, 0);
- propsBoxLayout->addWidget(m_showHiddenFiles, 4, 0);
+ QWidget* propsGrid = new QWidget();
+
+ QLabel* viewModeLabel = new QLabel(i18nc("@label:listbox", "View mode:"), propsGrid);
+ m_viewMode = new KComboBox(propsGrid);
+ m_viewMode->addItem(KIcon("view-list-icons"), i18nc("@item:inlistbox", "Icons"));
+ m_viewMode->addItem(KIcon("view-list-details"), i18nc("@item:inlistbox", "Details"));
+ m_viewMode->addItem(KIcon("view-file-columns"), i18nc("@item:inlistbox", "Column"));
+
+ QLabel* sortingLabel = new QLabel(i18nc("@label:listbox", "Sorting:"), propsGrid);
+ QWidget* sortingBox = new QWidget(propsGrid);
+
+ m_sortOrder = new KComboBox(sortingBox);
+ m_sortOrder->addItem(i18nc("@item:inlistbox Sort", "Ascending"));
+ m_sortOrder->addItem(i18nc("@item:inlistbox Sort", "Descending"));
+
+ m_sorting = new KComboBox(sortingBox);
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Name"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Size"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Date"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Permissions"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Owner"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Group"));
+ m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Type"));
+#ifdef HAVE_NEPOMUK
+ // TODO: Hided "sort by rating" and "sort by tags" as without caching the performance
+ // is too slow currently (Nepomuk will support caching in future releases).
+ //
+ // if (!Nepomuk::ResourceManager::instance()->init()) {
+ // m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Rating"));
+ // m_sorting->addItem(i18nc("@item:inlistbox Sort", "By Tags"));
+ // }
+#endif
+ m_showPreview = new QCheckBox(i18nc("@option:check", "Show preview"), propsBox);
+ m_showInGroups = new QCheckBox(i18nc("@option:check", "Show in groups"), propsBox);
+ m_showHiddenFiles = new QCheckBox(i18nc("@option:check", "Show hidden files"), propsBox);
+
+ m_additionalInfo = new QPushButton(i18nc("@action:button", "Additional Information"), propsBox);
+
+ QHBoxLayout* sortingLayout = new QHBoxLayout();
+ sortingLayout->setMargin(0);
+ sortingLayout->addWidget(m_sortOrder);
+ sortingLayout->addWidget(m_sorting);
+ sortingBox->setLayout(sortingLayout);
+
+ QGridLayout* propsGridLayout = new QGridLayout(propsGrid);
+ propsGridLayout->addWidget(viewModeLabel, 0, 0, Qt::AlignRight);
+ propsGridLayout->addWidget(m_viewMode, 0, 1);
+ propsGridLayout->addWidget(sortingLabel, 1, 0, Qt::AlignRight);
+ propsGridLayout->addWidget(sortingBox, 1, 1);
+
+ QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);
+ propsBoxLayout->addWidget(propsGrid);
+ propsBoxLayout->addWidget(m_showPreview);
+ propsBoxLayout->addWidget(m_showInGroups);
+ propsBoxLayout->addWidget(m_showHiddenFiles);
+ propsBoxLayout->addWidget(m_additionalInfo);