forked from len0rd/rockbox
main_menu_config: New plugin to configur the main menu order
Plugins/Applications/main_menu_config allows you to edit the main menu order without having to manually edit config.cfg. Press the standard OK button to access the internal menu which allows you to move items up/down in the order and toggle their visibility. Exit via this menu to have the order saved. (Suggestions welcome to improve this UI) Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
This commit is contained in:
parent
1210de217e
commit
6dbfd44b6e
7 changed files with 233 additions and 6 deletions
|
|
@ -484,10 +484,7 @@ MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN),
|
|||
struct menu_item_ex root_menu_;
|
||||
static struct menu_callback_with_desc root_menu_desc = {
|
||||
item_callback, ID2P(LANG_ROCKBOX_TITLE), Icon_Rockbox };
|
||||
struct menu_table {
|
||||
char *string;
|
||||
const struct menu_item_ex *item;
|
||||
};
|
||||
|
||||
static struct menu_table menu_table[] = {
|
||||
/* Order here represents the default ordering */
|
||||
{ "bookmarks", &bookmarks },
|
||||
|
|
@ -514,6 +511,13 @@ static struct menu_table menu_table[] = {
|
|||
#define MAX_MENU_ITEMS (sizeof(menu_table) / sizeof(struct menu_table))
|
||||
static struct menu_item_ex *root_menu__[MAX_MENU_ITEMS];
|
||||
|
||||
struct menu_table *root_menu_get_options(int *nb_options)
|
||||
{
|
||||
*nb_options = MAX_MENU_ITEMS;
|
||||
|
||||
return menu_table;
|
||||
}
|
||||
|
||||
void root_menu_load_from_cfg(void* setting, char *value)
|
||||
{
|
||||
char *next = value, *start, *end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue