From kde-commits Wed Jun 30 19:18:33 2004 From: Antonio Larrosa Jimenez Date: Wed, 30 Jun 2004 19:18:33 +0000 To: kde-commits Subject: kdemultimedia/juk Message-Id: <20040630191833.01D1199B3 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108862312104210 CVS commit by antlarr: When the column title shows "File Name (full path)", really show the full path in the column and use it for the searches (finally, I can search on my list of files without tags!) Also, changed the default value of m_fileColumnFullPathSort to match the default column title and the previous behaviour (which only showed the file name) M +10 -5 playlist.cpp 1.221 M +4 -1 playlistitem.cpp 1.89 --- kdemultimedia/juk/playlist.cpp #1.220:1.221 @@ -277,5 +277,5 @@ Playlist::Playlist(PlaylistCollection *c m_polished(false), m_applySharedSettings(true), - m_fileColumnFullPathSort(true), + m_fileColumnFullPathSort(false), m_disableColumnWidthUpdates(true), m_widthsDirty(true), @@ -298,5 +298,5 @@ Playlist::Playlist(PlaylistCollection *c m_polished(false), m_applySharedSettings(true), - m_fileColumnFullPathSort(true), + m_fileColumnFullPathSort(false), m_disableColumnWidthUpdates(true), m_widthsDirty(true), @@ -320,5 +320,5 @@ Playlist::Playlist(PlaylistCollection *c m_polished(false), m_applySharedSettings(true), - m_fileColumnFullPathSort(true), + m_fileColumnFullPathSort(false), m_disableColumnWidthUpdates(true), m_widthsDirty(true), @@ -341,5 +341,5 @@ Playlist::Playlist(PlaylistCollection *c m_polished(false), m_applySharedSettings(true), - m_fileColumnFullPathSort(true), + m_fileColumnFullPathSort(false), m_disableColumnWidthUpdates(true), m_widthsDirty(true), @@ -916,7 +916,12 @@ void Playlist::setSorting(int column, bo { if(column == columnOffset() + PlaylistItem::FileNameColumn) { - if(sortColumn() == column && ascending) + if(sortColumn() == column && ascending) { m_fileColumnFullPathSort = !m_fileColumnFullPathSort; + // We have to redo the search since the contents of the column changed + m_search.search(); + redisplaySearch(); + } + setColumnText(column, m_fileColumnFullPathSort ? i18n("File Name (full path)") --- kdemultimedia/juk/playlistitem.cpp #1.88:1.89 @@ -81,4 +81,7 @@ QString PlaylistItem::text(int column) c return d->fileHandle.tag()->comment(); case FileNameColumn: + if(playlist()->fileColumnFullPathSort()) + return d->fileHandle.fileInfo().absFilePath(); + else return d->fileHandle.fileInfo().fileName(); default: