]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add "Release Year" column to Dolphin's Details view
authorNathaniel Graham <pointedstick@zoho.com>
Wed, 13 Sep 2017 05:35:18 +0000 (10:35 +0500)
committerAlexey Min <alexey.min@gmail.com>
Wed, 13 Sep 2017 05:45:12 +0000 (10:45 +0500)
Summary:
Adds a "Release Year" column to Dolphin's Details view.

BUG: 384317

Test Plan: Tested in a KDE Neon VM.

Reviewers: aacid, broulik, #kde_applications, #dolphin, alexeymin, emmanuelp

Reviewed By: #dolphin, alexeymin, emmanuelp

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

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

index 6ca9fce6c19b51bea52785e484ef1271662755d9..86b010f620c95343fd9b97b6f1b30759ced7457b 100644 (file)
@@ -2315,6 +2315,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
         { "album",       AlbumRole,       I18N_NOOP2_NOSTRIP("@label", "Album"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "duration",    DurationRole,    I18N_NOOP2_NOSTRIP("@label", "Duration"),         I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "track",       TrackRole,       I18N_NOOP2_NOSTRIP("@label", "Track"),            I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
+        { "releaseYear", ReleaseYearRole, I18N_NOOP2_NOSTRIP("@label", "Release Year"),     I18N_NOOP2_NOSTRIP("@label", "Audio"),    true,  true  },
         { "path",        PathRole,        I18N_NOOP2_NOSTRIP("@label", "Path"),             I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
         { "deletiontime",DeletionTimeRole,I18N_NOOP2_NOSTRIP("@label", "Deletion Time"),    I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
         { "destination", DestinationRole, I18N_NOOP2_NOSTRIP("@label", "Link Destination"), I18N_NOOP2_NOSTRIP("@label", "Other"),    false, false },
index c18ced8e340319a0d609e3f1a616b00c3f414240..87c3cd131e66c7beebea8e2f3afd8419e626a85f 100644 (file)
@@ -286,7 +286,7 @@ private:
         GroupRole, TypeRole, DestinationRole, PathRole, DeletionTimeRole,
         // User visible roles available with Baloo:
         CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
-        WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole,
+        WordCountRole, TitleRole, LineCountRole, ArtistRole, GenreRole, AlbumRole, DurationRole, TrackRole, ReleaseYearRole,
         OriginUrlRole,
         // Non-visible roles:
         IsDirRole, IsLinkRole, IsHiddenRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
index 59aadcee0480ba8b280a0790b259c17a25bf078d..808a9ba7c563eaa0f9e6add7d80a24743174b603 100644 (file)
@@ -149,6 +149,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
         { "genre",     "genre"  },
         { "album",    "album" },
         { "duration",      "duration" },
+        { "releaseYear",    "releaseYear" },
         { "trackNumber",   "track" },
         { "originUrl", "originUrl" }
     };