FS#9646 - Radio presets list fixes

Attached to Project: Rockbox
Opened by Christopher Williams (christop) - Monday, 15 December 2008, 02:09 GMT
Last edited by Jonathan Gordon (jdgordon) - Tuesday, 16 December 2008, 12:05 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Revision 19442, should apply to all targets with an FM tuner

This is a set of fixes for the presets list in the FM tuner. The issues I found and fixed are:

* presets list does not scroll horizontally properly (due to the list_do_action() repeatedly timing out after 1 second)
* when returning from the presets list to the main radio screen, the highlighted item in the list scrolls on main radio screen (if it's too wide for the screen, that is)
* when adding a preset while in the presets list (with ACTION_FM_PRESET) the list is not updated with the new preset
* when clearing presets (or deleting the last preset), the main screen still shows the same preset number
* when deleting a preset, the current preset number doesn't change if it's past the end of the list (this is partially related to the previous issue)
* the find_closest_preset() routine could be improved to actually find the closest frequency that is saved as a preset
* inputting a preset name could be optimized in both time and space (especially in radio_add_preset()); also the length parameter to kbd_input() includes the null terminator, so I added one to those arguments
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Tuesday, 16 December 2008, 12:05 GMT
Reason for closing:  Accepted
Additional comments about closing:  thanks. in r19457