]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/viewpropertiesdialog.cpp
KUIT adapations for labels
[dolphin.git] / src / viewpropertiesdialog.cpp
index 5d7fbc59f631ce65cbd2367d0cd6b01e1d9de5f7..153e4b5f801308cb6286d9447a02a272e239dcc8 100644 (file)
 #include "dolphin_generalsettings.h"
 #include "viewproperties.h"
 
+#ifdef HAVE_NEPOMUK
+#include <config-nepomuk.h>
+#include <nepomuk/resourcemanager.h>
+#endif
+
 #include <kcomponentdata.h>
 #include <klocale.h>
 #include <kiconloader.h>
@@ -78,10 +83,10 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     // create 'Properties' group containing view mode, sorting, sort order and show hidden files
     QWidget* propsBox = main;
     if (!useGlobalViewProps) {
-        propsBox = new QGroupBox(i18n("Properties"), main);
+        propsBox = new QGroupBox(i18nc("@title:group", "Properties"), main);
     }
 
-    QLabel* viewModeLabel = new QLabel(i18n("View mode:"), propsBox);
+    QLabel* viewModeLabel = new QLabel(i18nc("@label:listbox", "View mode:"), propsBox);
     m_viewMode = new QComboBox(propsBox);
     m_viewMode->addItem(KIcon("fileview-icon"), i18n("Icons"));
     m_viewMode->addItem(KIcon("fileview-detailed"), i18n("Details"));
@@ -90,7 +95,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     m_viewMode->setCurrentIndex(index);
     const bool iconsViewEnabled = (index == DolphinView::IconsView);
 
-    QLabel* sortingLabel = new QLabel(i18n("Sorting:"), propsBox);
+    QLabel* sortingLabel = new QLabel(i18nc("@label:listbox", "Sorting:"), propsBox);
     QWidget* sortingBox = new QWidget(propsBox);
 
     m_sortOrder = new QComboBox(sortingBox);
@@ -107,6 +112,12 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     m_sorting->addItem(i18n("By Owner"));
     m_sorting->addItem(i18n("By Group"));
     m_sorting->addItem(i18n("By Type"));
+#ifdef HAVE_NEPOMUK
+    if (!Nepomuk::ResourceManager::instance()->init()) {
+        m_sorting->addItem(i18n("By Rating"));
+        m_sorting->addItem(i18n("By Tags"));
+    }
+#endif
     m_sorting->setCurrentIndex(m_viewProps->sorting());
 
     QHBoxLayout* sortingLayout = new QHBoxLayout();
@@ -115,7 +126,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     sortingLayout->addWidget(m_sorting);
     sortingBox->setLayout(sortingLayout);
 
-    QLabel* additionalInfoLabel = new QLabel(i18n("Additional information:"), propsBox);
+    QLabel* additionalInfoLabel = new QLabel(i18nc("@label:listbox", "Additional information:"), propsBox);
     m_additionalInfo = new QComboBox(propsBox);
     m_additionalInfo->addItem(i18n("No Information"), KFileItemDelegate::NoInformation);
     m_additionalInfo->addItem(i18n("Type"), KFileItemDelegate::FriendlyMimeType);
@@ -125,13 +136,13 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     m_additionalInfo->setCurrentIndex(addInfoIndex);
     m_additionalInfo->setEnabled(iconsViewEnabled);
 
-    m_showPreview = new QCheckBox(i18n("Show preview"), propsBox);
+    m_showPreview = new QCheckBox(i18nc("@option:check", "Show preview"), propsBox);
     m_showPreview->setChecked(m_viewProps->showPreview());
 
-    m_showInGroups = new QCheckBox(i18n("Show in Groups"), propsBox);
+    m_showInGroups = new QCheckBox(i18nc("@option:check", "Show in Groups"), propsBox);
     m_showInGroups->setChecked(m_viewProps->categorizedSorting());
 
-    m_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsBox);
+    m_showHiddenFiles = new QCheckBox(i18nc("@option:check", "Show hidden files"), propsBox);
     m_showHiddenFiles->setChecked(m_viewProps->showHiddenFiles());
 
     QGridLayout* propsBoxLayout = new QGridLayout(propsBox);
@@ -169,12 +180,15 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
     // for each directory:
     if (!useGlobalViewProps) {
         // create 'Apply View Properties To' group
-        QGroupBox* applyBox = new QGroupBox(i18n("Apply View Properties To"), main);
+        QGroupBox* applyBox = new QGroupBox(i18nc("@title:group", "Apply View Properties To"), main);
 
-        m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), applyBox);
+        m_applyToCurrentFolder = new QRadioButton(i18nc("@option:radio Apply View Properties To",
+                                                        "Current folder"), applyBox);
         m_applyToCurrentFolder->setChecked(true);
-        m_applyToSubFolders = new QRadioButton(i18n("Current folder including all sub folders"), applyBox);
-        m_applyToAllFolders = new QRadioButton(i18n("All folders"), applyBox);
+        m_applyToSubFolders = new QRadioButton(i18nc("@option:radio Apply View Properties To",
+                                                     "Current folder including all sub folders"), applyBox);
+        m_applyToAllFolders = new QRadioButton(i18nc("@option:radio Apply View Properties To",
+                                                     "All folders"), applyBox);
 
         QButtonGroup* applyGroup = new QButtonGroup(this);
         applyGroup->addButton(m_applyToCurrentFolder);
@@ -186,7 +200,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
         applyBoxLayout->addWidget(m_applyToSubFolders);
         applyBoxLayout->addWidget(m_applyToAllFolders);
 
-        m_useAsDefault = new QCheckBox(i18n("Use as default for new folders"), main);
+        m_useAsDefault = new QCheckBox(i18nc("@option:check", "Use as default for new folders"), main);
 
         topLayout->addWidget(applyBox);
         topLayout->addWidget(m_useAsDefault);