diff --git a/res/doc b/res/doc index 69dd045..e7af22b 100644 --- a/res/doc +++ b/res/doc @@ -191,10 +191,12 @@ # option, only the first one takes effect. # # the option name, one of: +# menu_main_15505_enabled - controls enablement of the NickelMenu button on 4.23.15505+ # menu_main_15505_label - sets the label used for the NickelMenu button on 4.23.15505+ # menu_main_15505_icon - sets the icon used for the NickelMenu button on 4.23.15505+ # menu_main_15505_icon_active - sets the active icon used for the NickelMenu button on 4.23.15505+ # the option value: +# menu_main_15505_enabled - 0 or 1 # menu_main_15505_label - the label to use instead of "NickelMenu" # menu_main_15505_icon - the path passed to QPixmap # menu_main_15505_icon_active - the path passed to QPixmap diff --git a/src/nickelmenu.cc b/src/nickelmenu.cc index bf08554..a311e68 100644 --- a/src/nickelmenu.cc +++ b/src/nickelmenu.cc @@ -267,6 +267,12 @@ extern "C" __attribute__((visibility("default"))) void _nm_menu_hook2(MainNavVie NM_LOG("MainNavView::MainNavView(%p, %p)", _this, parent); MainNavView_MainNavView(_this, parent); + const char* config = nm_global_config_experimental("menu_main_15505_enabled"); + if (config && strcmp("0", config) == 0) { + NM_LOG("Main menu disabled"); + return; + } + NM_LOG("Adding main menu button in tab bar for firmware 4.23.15505+."); if (!MainNavButton_MainNavButton || !MainNavButton_setPixmap || !MainNavButton_setActivePixmap || !MainNavButton_setText || !MainNavButton_setText) {