Version: (using KDE 3.1.9) Compiler: gcc version 3.2.2 OS: Linux (i686) release 2.4.21-pre5-aa2 I Would like to see Comment Column capability added to juk. I don't code, but I don't think this should be too hard.
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; }