FS#12104 - Prefill the playlist name when creating a new playlist from the file browser (or from elsewhere)

Attached to Project: Rockbox
Opened by Ophir Lojkine (lovasoa) - Saturday, 07 May 2011, 22:37 GMT
Last edited by Frank Gevaerts (fg) - Sunday, 15 May 2011, 10:38 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


As it's not easy to enter text on a small DAAP, adding a new playlist from the file browser took a long time. We had to enter the full name of the playlist from the keyboard.
With this patch, we can still enter text, but the text field is prefilled with the name of the directory, or file, from which the playlist is created.
This task depends upon

Closed by  Frank Gevaerts (fg)
Sunday, 15 May 2011, 10:38 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed as r29882
Comment by Ophir Lojkine (lovasoa) - Sunday, 08 May 2011, 07:03 GMT
I updated the patch. It makes sense to prefill the text field only when the playlist is generated from a folder.
If it's generated from a file, the user will want to add other files, and rarely to name the playlist according to the first file in it.
If it's already a playlist, as it's odd to copy a playlist into another playlist, the user will want to add other files or playlists to the current one, and will not want to give to the new playlist the same name as the original one.
Comment by Nils Wallménius (nls) - Monday, 09 May 2011, 21:45 GMT
I think this looks good but i'd prefer if you'd leave the +1 to when name is accessed, since name!=NULL+1 looks really weird to me
Comment by Ophir Lojkine (lovasoa) - Monday, 09 May 2011, 22:07 GMT
You are right. It was silly!