Settings menu: add main menu customization

Lets you launch the main_menu_config plugin
from Settings, so that it remains accessible,
even after all other menu items have been
hidden.

Includes minor changes to the main menu config
plugin, so that it better fits in with the rest
of the settings menus:

* Keep theme enabled
* Autosave
* Add "On" or "Off" suffix to each item, to prevent
  confusion when Icon_Config is blank, as is the case
  with certain iconsets
* Update current selection after swapping items
* Prefix spoken selection with row number for enhanced
  clarity when swapping items
* Change title to LANG_MAIN_MENU
* ACTION_STD_OK to toggle an item's visibility
* ACTION_STD_CONTEXT to access options for reordering
  menu items, or for reverting to the default menu
* Ask for confirmation before reverting

Change-Id: I74240b94243224c76e23ef8f3a0559bd8ba28df0
This commit is contained in:
Christian Soffke 2025-04-19 02:16:58 +02:00
parent dbeefebcad
commit 5efb6d7fac
7 changed files with 99 additions and 65 deletions

View file

@ -495,6 +495,15 @@ MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
/* INFO MENU */
/***********************************/
static int main_menu_config(void)
{
plugin_load(PLUGIN_APPS_DIR "/main_menu_config.rock", NULL);
return 0;
}
MENUITEM_FUNCTION(main_menu_config_item, 0, ID2P(LANG_MAIN_MENU),
main_menu_config, NULL, Icon_Rockbox);
/***********************************/
/* MAIN MENU */
@ -509,6 +518,7 @@ MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), NULL,
#if CONFIG_RTC
&timedate_item,
#endif
&main_menu_config_item,
&manage_settings,
);
/* MAIN MENU */