]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add document title to additional information
authorKai Uwe Broulik <kde@privat.broulik.de>
Thu, 12 Jan 2017 13:23:01 +0000 (14:23 +0100)
committerKai Uwe Broulik <kde@privat.broulik.de>
Thu, 12 Jan 2017 13:23:12 +0000 (14:23 +0100)
Allows showing the document title of e.g. a PDF alongside the file name

BUG: 321356

Differential Revision: https://phabricator.kde.org/D3972

src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.h
src/kitemviews/private/kbaloorolesprovider.cpp

index 7b252a34668c101e2fd6f25926978d208798cdb5..c35d164e1e32e1b3498b5033edfb219ba129a4a1 100644 (file)
@@ -2225,6 +2225,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
         { "rating",      RatingRole,      I18N_NOOP2_NOSTRIP("@label", "Rating"),           0, 0,                                     true,  false },
         { "tags",        TagsRole,        I18N_NOOP2_NOSTRIP("@label", "Tags"),             0, 0,                                     true,  false },
         { "comment",     CommentRole,     I18N_NOOP2_NOSTRIP("@label", "Comment"),          0, 0,                                     true,  false },
+        { "title",       TitleRole,       I18N_NOOP2_NOSTRIP("@label", "Title"),            I18N_NOOP2_NOSTRIP("@label", "Document"), true,  true  },
         { "wordCount",   WordCountRole,   I18N_NOOP2_NOSTRIP("@label", "Word Count"),       I18N_NOOP2_NOSTRIP("@label", "Document"), true,  true  },
         { "lineCount",   LineCountRole,   I18N_NOOP2_NOSTRIP("@label", "Line Count"),       I18N_NOOP2_NOSTRIP("@label", "Document"), true,  true  },
         { "imageSize",   ImageSizeRole,   I18N_NOOP2_NOSTRIP("@label", "Image Size"),       I18N_NOOP2_NOSTRIP("@label", "Image"),    true,  true  },
index 8a0df72b921cf933278ef7b7cd0a923080b08777..717afb9a7f9a49c81c7083af34e02bc14e6574d8 100644 (file)
@@ -284,7 +284,7 @@ private:
         GroupRole, TypeRole, DestinationRole, PathRole,
         // User visible roles available with Baloo:
         CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
-        WordCountRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
+        WordCountRole, TitleRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
         OriginUrlRole,
         // Non-visible roles:
         IsDirRole, IsLinkRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
index e0b889e6cc6cf5ef60361bc0b25f0cb9d1d1e85b..9f151df92ab91dc84687aa4339bf90acf507d2c7 100644 (file)
@@ -138,6 +138,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
         { "rating", "rating" },
         { "tag",        "tags" },
         { "comment",   "comment" },
+        { "title",         "title" },
         { "wordCount",     "wordCount" },
         { "lineCount",     "lineCount" },
         { "width",         "imageSize" },