From 9f48f5f2079a46138489fbf62fa94e0e7368ee1c Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 27 Feb 2012 09:34:37 +1100 Subject: [PATCH] root menu: Use - to reset the root menu order from a config use root_menu_order: - to reset the order Change-Id: I10c38926d79b10c88e5f1e0acdd85ca1a1489edf --- apps/root_menu.c | 5 +++++ manual/advanced_topics/main.tex | 2 ++ 2 files changed, 7 insertions(+) diff --git a/apps/root_menu.c b/apps/root_menu.c index 16665c1824..6e3164cf04 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -517,6 +517,11 @@ void root_menu_load_from_cfg(void* setting, char *value) unsigned int menu_item_count = 0, i; bool main_menu_added = false; + if (*value == '-') + { + root_menu_set_default(setting, NULL); + return; + } root_menu_.flags = MENU_HAS_DESC | MT_MENU; root_menu_.submenus = (const struct menu_item_ex **)&root_menu__; root_menu_.callback_and_desc = &root_menu_desc; diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex index 196053759b..eaa0494691 100644 --- a/manual/advanced_topics/main.tex +++ b/manual/advanced_topics/main.tex @@ -23,6 +23,8 @@ in the list. The items whose words do not occur in the list will be hidden, with one exception: the menu item ``Settings'' will be shown even if its word is not in the list (it is added as the last item then). +Use the line \config{root\_menu\_order:-} to reset the menu order + Only the main menu can be customised this way, submenus can not. \opt{lcd_bitmap}{