Add setting for numeric list sort order

The sort order of numeric lists can now be changed with the
new "List Order" setting. It defaults to ascending for most
scrollwheel targets and descending for all others, matching
the old hardcoded behavior.

Change-Id: I4866f04ec5995158edf9e40badf7f661b3ddea81
This commit is contained in:
Aidan MacDonald 2021-11-21 16:30:38 +00:00
parent a3684e090e
commit dcac2c616f
8 changed files with 99 additions and 35 deletions

View file

@ -1216,6 +1216,15 @@ const struct settings_list settings[] = {
false,"scroll paginated",NULL),
OFFON_SETTING(0,list_wraparound,LANG_LIST_WRAPAROUND,
true,"list wraparound",NULL),
CHOICE_SETTING(0, list_order, LANG_LIST_ORDER,
#if defined(HAVE_SCROLLWHEEL) && !defined(FIIO_M3K)
1,
#else
0,
#endif
/* values are defined by the enum in option_select.h */
"list order", "descending,ascending",
NULL, 2, ID2P(LANG_DESCENDING), ID2P(LANG_ASCENDING)),
#ifdef HAVE_LCD_COLOR
{F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.fg_color,-1,