Ok I just replaced Artist with Comment for a quick test and it worked fine
on my machine... could you zip up the code and send it to me or just send me
a diff if you want.

elrod

Steve Kemp wrote:

> Hi,
>
>   I've recently started to hack on the Freeamp sources,
>  (Win32, Freeamp-2.1b3 for reference - my intention is
>  that I'll do the Win32 version, and then the Linux one.
>  If the changes are popular enough then I'm sure somebody
>  else will step forward to fill in the other ports).
>
>   I'm attempting to add the ability to choose the columns
>  that are included in the playlist window, via a new page
>  in the Options dialog.
>
>   Most of the code has been written now, but I've got
>  two specific problems - and I was hoping that somebody
>  familiar with the internals could point out where I'm
>  going wrong...
>
> 1)
>   Okay, the first problem I'm having is the sorting
>  of the entries in the playlist.
>   Normally clicking on a column header will sort that
>  column.  Since I've added extra columns I've had to
>  add extra handling to make sure they are sortable.
>
>   Specifically I'm having problems with the sorting
>  of the "Comment" field of an entry.
>   Inside <playlist.h> I've got the following:
>
>  kPlaylistSortKey_Time,
>  kPlaylistSortKey_Location,
>  kPlaylistSortKey_FileName,
>  kPlaylistSortKey_Comment,      //  Added to sort on ID3 Comment.
>  kPlaylistSortKey_LastKey,
>
>   And in <playlist.cpp> I've added the following:
>
>               case kPlaylistSortKey_Comment:
>              {
>                                 result = (lstrcmpi(m1.Comment().c_str(),
> m2.Comment().c_str()) < 0);
>                  break;
>              }
>
>   This code is being called correctly, but has no effect..
>   Is there something I'm missing?
>   (For comparison the code I'm using to sort on Year, and Genre
>  is working correctly)
>
> 2)
>    The other problem I'm having is the updating of the playlist
>   window when the user edits the columns displayed via a new
>   page in the options dialog.
>
>    If the user adjusts the columns displayed and restarts FreeAmp
>   everything works as expected.  Similarly if the playlist view
>   is closed when the options are changed opening it works correctly.
>    I cannot see how to force the playlist to reinitialize itself
>   if it is visible, and the options are changed.
>
>    Any help would be appreciated...
>
> Steve
> ---
> http://GNUSoftware.com/ -- GNU Software for Windows Users
> http://steve.org.uk/    -- All about Steve
>
> _______________________________________________
> [EMAIL PROTECTED]
> http://www.freeamp.org/mailman/listinfo/freeamp-dev

_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to