]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanel.cpp
Simplify how Nepomuk comments can be edited by the user:
[dolphin.git] / src / panels / information / informationpanel.cpp
index 1fa5565d766186c2fbd45d1a4b1381a7cfffa668..2150c64659862522d28342488551de169be23024 100644 (file)
@@ -302,7 +302,7 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
         }
 
         if (!skip) {
-            const QString label = key; // TODO
+            const QString label = tunedLabel(key); // TODO
             QAction* action = new QAction(label, &popup);
             action->setCheckable(true);
             action->setChecked(settings.readEntry(key, true));
@@ -587,7 +587,7 @@ void InformationPanel::showMetaInfo()
                     // instead of it.value().toString()
                     // TODO #2: using tunedLabel() is a workaround for KDE 4.3 until
                     // we get translated labels
-                    m_metaTextLabel->add(tunedLabel(label), it.value().toString());
+                    m_metaTextLabel->add(tunedLabel(label) + ':', it.value().toString());
                 }
                 ++it;
             }
@@ -672,14 +672,20 @@ void InformationPanel::initMetaInfoSettings(KConfigGroup& group)
     if (!group.readEntry("initialized", false)) {
         // The resource file is read the first time. Assure
         // that some meta information is disabled per default.
-        group.writeEntry("fileExtension", false);
-        group.writeEntry("url", false);
-        group.writeEntry("sourceModified", false);
-        group.writeEntry("parentUrl", false);
-        group.writeEntry("size", false);
-        group.writeEntry("mime type", false);
-        group.writeEntry("depth", false);
-        group.writeEntry("name", false);
+
+        static const char* disabledProperties[] = {
+            "asText", "contentSize", "depth", "fileExtension",
+            "fileName", "fileSize", "isPartOf", "mimetype", "name",
+            "parentUrl", "plainTextContent", "sourceModified",
+            "size", "url",
+            0 // mandatory last entry
+        };
+
+        int i = 0;
+        while (disabledProperties[i] != 0) {
+            group.writeEntry(disabledProperties[i], false);
+            ++i;
+        }
 
         // mark the group as initialized
         group.writeEntry("initialized", true);