FS#7980 - Select default option in an option list
Opened by Stephane Doyon (sdoyon) - Wednesday, 17 October 2007, 04:57 GMT
Last edited by Stephane Doyon (sdoyon) - Sunday, 20 April 2008, 14:13 GMT
|
DetailsThis patch adds an action to the option_screen to cause the default value
for a particular setting to become the current selection. It allows you to see which value is the default, and at that point you can confirm it or not. The code to do this is all in there, it just needs to be moved to separate functions so we can reuse it. Particularly useful for settings with long ranges of options, like a lot of the sound settings such as base and treble for example. I'm blind, and I find it takes a lot of button'ing around to put the setting back to zero. It's also great for when music is playing and the sound menus are not spoken. And as a bonus, it lets one see what the safe default option is supposed to be when browsing an obscure option. Do others think this is useful? The only tough part is the button assignment of course. This patch has button mappings for x5 and e200 only, and at this point I've just added them to the list context, but perhaps a separate context could be created. For X5 I chose SELECT+POWER. (I thought the awkwardness wasn't a big issue in this case.) For e200 it's POWER+SELECT. |
also, instead of adding a new action, I tinhk ACTION_STD_CONTEXT would work fine in the option screen for reset as it shouldnt be used currently anyway.
I know you prefer me to not modify your patches.
But is it ok that I added a keymap for h300(and h100 I think)?
Sorry if you didn't want this.
Hopefully I didn't do anything wrong.
Anyway the keymap for h300 is play and rec.
Not the easiest key press but should work for this.
Here it is...
>fine in the option screen for reset as it shouldnt be used currently anyway.
Oh! Don't know how I missed that. Well then that makes the patch
really simple!
to modify keymaps.
Thanks.
BTW Were my changes ok? Or was the indenting and stuff wrong. I know you have a better way now but just wanting feedback mainly on what I did wrong and can improve on.
I know I only added one line.
Thx.
Well... you had an extra space between ACTION_SETTINGS_RESET
and BUTTON_ON|BUTTON_REC. They normally have the columns aligned in a
nice table format. I know that's hard to get right with speech though.
Any objections to committing this?
warning: unless there are objections, I'll commit this in a couple of days.
except, in setting_reset() the string resseting is wrong.. it should be using the length struct member, not MAX_FILENAME (although, admitadly thats my mistake to being with.. but please fix in the commit)