This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9677 - Change the erase dynamic playlist warning to a menu with several options including a quick save
Attached to Project:
Rockbox
Opened by Alex Bennee (ajb) - Friday, 19 December 2008, 11:26 GMT+2
Last edited by Nils Wallménius (nls) - Friday, 19 December 2008, 14:35 GMT+2
Opened by Alex Bennee (ajb) - Friday, 19 December 2008, 11:26 GMT+2
Last edited by Nils Wallménius (nls) - Friday, 19 December 2008, 14:35 GMT+2
|
DetailsAs discussed on the mailing list this patch gets rid of the "About to Erase Dynamic Playlist" warning and replaces it with a menu option to save the current playlist under it's existing name.
The attached patch is a first cut for review as I'm just getting used to the menu system. If people think it's the right way to go I'll clean it up properly. Any suggestions for tweaks to the functionality also welcome. |
This task depends upon
Also, this should be called just before each call to playlist_create() that refers to the current playlist - there may currently be paths through the code where the warning doesn't occur, yet the playlist is lost.
(Note the warning code can't be inside playlist._create() itself, as playlist.c shouldn't have any UI code at all.)
I shall see where else playlist_create is called.
don't seem to be able to access via the menues. These are
onplay.c:add_to_playlist and playlist.c:create_and_play_dir. Any
pointers as to where I trigger them from?
Currently starting a bookmark will kill the current playlist via
bookmark_play which I shall endeavour to fix once I've decoded the logic.
* Changed order of questions and tweaked phrasing
* Common name funging code: Only issue is it would be nicer to calculate the whole path once for the input to the menu and the actual write.
What does "funge" mean?
I see you disable some old code with an "#if 0". IMO, if code is really no longer used, it should simply be removed instead of lingering on in an #if 0.
your current playlist you can do that straight from the warning menu
rather than canceling and going to the save menu.
The option to save as the current playlist name is also better.
I shall find a better name for the funge function and remove the #if 0
code in the next version.
Re-factored to get rid of badly named "funge" function
Cleaned up commentary for menus
Removed unneeded passing of variables
Don't pass playlist * when we don't need to. It gets confusing otherwise.
The patch has been re-based and re-tested on the current SVN head.
a few remarks:
- playlist_maybe_save_current() sounds strange, maybe playlist_try_save_current() would sound better ? (not really important)
- You change some lang entrys (especially a id) instead of depreciating the old one, and adding new ones. I am not sure if its save to change .lang entry, it could break language tools and voicefiles.
- A Cancel action in the new menu would be nice.
Otherwise i am not sure if the code is ok, because i am not really a expert in this area.
* Made all use of LANG entries new (not re-using old IDs)
* Added Cancel option
I left the playlist_maybe_save_current() as I'm not sure playlist_try_save_current() is much better.