diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2014-02-13 22:01:13 +1100 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2014-02-13 22:11:23 +1100 |
commit | 6dbfd44b6e6a4e01066ff3a99748e586d7cd458a (patch) | |
tree | 0570c0dbe96277cb8e31a6797b3b8628aea1e5b0 /apps/root_menu.c | |
parent | 1210de217ebdbd35734f57d82a6e935ef60e6555 (diff) | |
download | rockbox-6dbfd44b6e6a4e01066ff3a99748e586d7cd458a.tar.gz rockbox-6dbfd44b6e6a4e01066ff3a99748e586d7cd458a.zip |
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
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r-- | apps/root_menu.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 71844dd41a..f83a97b9ed 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -484,10 +484,7 @@ MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN), | |||
484 | struct menu_item_ex root_menu_; | 484 | struct menu_item_ex root_menu_; |
485 | static struct menu_callback_with_desc root_menu_desc = { | 485 | static struct menu_callback_with_desc root_menu_desc = { |
486 | item_callback, ID2P(LANG_ROCKBOX_TITLE), Icon_Rockbox }; | 486 | item_callback, ID2P(LANG_ROCKBOX_TITLE), Icon_Rockbox }; |
487 | struct menu_table { | 487 | |
488 | char *string; | ||
489 | const struct menu_item_ex *item; | ||
490 | }; | ||
491 | static struct menu_table menu_table[] = { | 488 | static struct menu_table menu_table[] = { |
492 | /* Order here represents the default ordering */ | 489 | /* Order here represents the default ordering */ |
493 | { "bookmarks", &bookmarks }, | 490 | { "bookmarks", &bookmarks }, |
@@ -514,6 +511,13 @@ static struct menu_table menu_table[] = { | |||
514 | #define MAX_MENU_ITEMS (sizeof(menu_table) / sizeof(struct menu_table)) | 511 | #define MAX_MENU_ITEMS (sizeof(menu_table) / sizeof(struct menu_table)) |
515 | static struct menu_item_ex *root_menu__[MAX_MENU_ITEMS]; | 512 | static struct menu_item_ex *root_menu__[MAX_MENU_ITEMS]; |
516 | 513 | ||
514 | struct menu_table *root_menu_get_options(int *nb_options) | ||
515 | { | ||
516 | *nb_options = MAX_MENU_ITEMS; | ||
517 | |||
518 | return menu_table; | ||
519 | } | ||
520 | |||
517 | void root_menu_load_from_cfg(void* setting, char *value) | 521 | void root_menu_load_from_cfg(void* setting, char *value) |
518 | { | 522 | { |
519 | char *next = value, *start, *end; | 523 | char *next = value, *start, *end; |