Details

This patch decouples playlist editting from the play/stop state. So,
you get the same playlist menu independent of whether rockbox is
playing or stopped (and all the commands do the same things). Also,
editting the playlist while stopped does not restart playback.

The idea behind this is that now the current playlist appears to
the user to be 'still there' when stopped (ie you can view it and
resume it), it doesn't make sense for an insert while stopped to
insert to an empty playlist.

I have done two patches, the first just makes the current playlist
menu available when stopped (no changes to the menu). The only changes
are to onplay.c and most of the changes were deletes, so the new code
is ~30 lines shorter than the original.

The second patch does the same as the first, but also:

1) it renames "Play Next" to "Replace"
2) it adds a "Replace shuffled" command
3) it renames "Insert" to "Insert in order" (and the same for queue)
4) it does not show the "Insert in order" order command until it is
useful: after an "Insert next" has already been done.

I think these changes make the playlist editing much easier to
understand for people new to rockbox (and easier to remember for those
not so new). In particular, the current "Insert" can do one of 3 different things (add to empty, insert next or insert after previous insert/ insert next). With the second patch all commands always do the same thing, and the renaming makes it a bit clearer what that thing is.

1. Allowing this means that the playlist after resuming may not be exactly the same as when it was stopped (it could be completely different in fact). I'm okay with that but wanted to make sure everyone else was. Also, what should the default resume behaviour be if you delete the current playing track while stopped? Reset to start of playlist?

2. In your second patch, what's the reason for relating "Insert in order" with "Insert next"? The two should work completely independently.

If the current track is removed, playback should resume on the next track in the playlist.

One major point, I'd prefer "Play" and "Play Shuffled" rather than "Replace" and "Replace Shuffled". Also selecting these options should immediately start the file playing (currently it leaves the existing file playing or stays in the browswer while stopped. This is needed to maintain the current flexibility (e.g. select a directory when stopped and choose Insert Shuffled) so it's unlikely to be accepted without this.