diff options
| author | Peter Penz <[email protected]> | 2009-10-16 22:53:27 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-10-16 22:53:27 +0000 |
| commit | e512e98b41f5d69b9e263ca703d75383e705ff05 (patch) | |
| tree | be9aa712daf290a38971d85c48941f6fdb1dc106 /src/panels/information/metadataconfigurationdialog.cpp | |
| parent | ee088814864ba506173ecdd2003b11b081a10644 (diff) | |
* allow editing of tags
* minor adjustments for the default settings of visible meta data
svn path=/trunk/KDE/kdebase/apps/; revision=1036296
Diffstat (limited to 'src/panels/information/metadataconfigurationdialog.cpp')
| -rw-r--r-- | src/panels/information/metadataconfigurationdialog.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/panels/information/metadataconfigurationdialog.cpp b/src/panels/information/metadataconfigurationdialog.cpp index f3bb929da..ec6f4d1a2 100644 --- a/src/panels/information/metadataconfigurationdialog.cpp +++ b/src/panels/information/metadataconfigurationdialog.cpp @@ -86,7 +86,6 @@ void MetaDataConfigurationDialog::Private::loadMetaData() item->setData(Qt::UserRole, key); const bool show = settings.readEntry(key, true); item->setCheckState(show ? Qt::Checked : Qt::Unchecked); - } #ifdef HAVE_NEPOMUK @@ -105,13 +104,29 @@ void MetaDataConfigurationDialog::Private::loadMetaData() const QString key = prop.name(); // Meta information provided by Nepomuk that is already - // available from KFileItem should not be configurable. - bool skip = (key == "contentSize") || - (key == "fileExtension") || - (key == "name") || - (key == "lastModified") || - (key == "size") || - (key == "mimeType"); + // available from KFileItem as "fixed item" (see above) + // should not be shown as second entry. + static const char* hiddenProperties[] = { + "contentSize", // = fixed item "size" + "fileExtension", // ~ fixed item "type" + "hasTag", // = fixed item "tags" + "name", // not shown as part of the meta data widget + "lastModified", // = fixed item "modified" + "size", // = fixed item "size" + "mimeType", // = fixed item "type" + "numericRating", // = fixed item "rating" + 0 // mandatory last entry + }; + bool skip = false; + int i = 0; + while (hiddenProperties[i] != 0) { + if (key == hiddenProperties[i]) { + skip = true; + break; + } + ++i; + } + if (!skip) { // const QString label = tunedLabel(prop.label()); const QString label = prop.label() + " --- " + key; @@ -187,5 +202,4 @@ void MetaDataConfigurationDialog::slotButtonClicked(int button) } } - #include "metadataconfigurationdialog.moc" |
