Summary: | Add Comment Column To Juk | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | davidsmind |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
davidsmind
2003-04-01 04:24:24 UTC
Subject: kdemultimedia/juk CVS commit by wheeler: Added a comment column (that's hidden by default) and also made the file name column hidden by default. The comment column only displays the first 50 characters of the comment. CCMAIL:56684-done@bugs.kde.org M +8 -0 playlist.cpp 1.65 M +6 -0 playlistitem.cpp 1.29 M +2 -1 playlistitem.h 1.25 --- kdemultimedia/juk/playlist.cpp #1.64:1.65 @@ -658,4 +658,5 @@ void Playlist::setup() addColumn(i18n("Year")); addColumn(i18n("Length")); + addColumn(i18n("Comment")); addColumn(i18n("File Name")); @@ -697,4 +698,11 @@ void Playlist::setup() connect(m_headerMenu, SIGNAL(activated(int)), this, SLOT(slotToggleColumnVisible(int))); + + ////////////////////////////////////////////////// + // hide some columns by default + ////////////////////////////////////////////////// + + hideColumn(PlaylistItem::CommentColumn); + hideColumn(PlaylistItem::FileNameColumn); ////////////////////////////////////////////////// --- kdemultimedia/juk/playlistitem.cpp #1.28:1.29 @@ -261,4 +261,10 @@ void PlaylistItem::slotRefreshImpl() setText(LengthColumn, tag()->lengthString()); setText(FileNameColumn, filePath()); + + QString shortComment = tag()->comment().simplifyWhiteSpace(); + if(shortComment.length() > 50) + shortComment = shortComment.left(47) + "..."; + + setText(CommentColumn, shortComment); } --- kdemultimedia/juk/playlistitem.h #1.24:1.25 @@ -61,5 +61,6 @@ class PlaylistItem : public QObject, pub public: enum ColumnType { TrackColumn = 0, ArtistColumn = 1, AlbumColumn = 2, TrackNumberColumn = 3, - GenreColumn = 4, YearColumn = 5, LengthColumn = 6, FileNameColumn = 7 }; + GenreColumn = 4, YearColumn = 5, LengthColumn = 6, CommentColumn = 7, + FileNameColumn = 8 }; static int lastColumn() { return FileNameColumn; } |