diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index e6098c9720..2ed033e330 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5090,17 +5090,40 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_AI_SERVICE_SETTINGS_LIST: { + settings_t *settings = config_get_ptr(); + bool ai_service_enable = settings->bools.ai_service_enable; + menu_displaylist_build_info_selective_t build_list[] = { - {MENU_ENUM_LABEL_AI_SERVICE_MODE, PARSE_ONLY_UINT, true }, - {MENU_ENUM_LABEL_AI_SERVICE_URL, PARSE_ONLY_STRING, true }, - {MENU_ENUM_LABEL_AI_SERVICE_ENABLE, PARSE_ONLY_BOOL, true}, - {MENU_ENUM_LABEL_AI_SERVICE_PAUSE, PARSE_ONLY_BOOL, true}, - {MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG, PARSE_ONLY_UINT, true}, - {MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG, PARSE_ONLY_UINT, true}, + {MENU_ENUM_LABEL_AI_SERVICE_ENABLE, PARSE_ONLY_BOOL, true}, + {MENU_ENUM_LABEL_AI_SERVICE_MODE, PARSE_ONLY_UINT, false}, + {MENU_ENUM_LABEL_AI_SERVICE_URL, PARSE_ONLY_STRING, false}, + {MENU_ENUM_LABEL_AI_SERVICE_PAUSE, PARSE_ONLY_BOOL, false}, + {MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG, PARSE_ONLY_UINT, false}, + {MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG, PARSE_ONLY_UINT, false}, }; for (i = 0; i < ARRAY_SIZE(build_list); i++) { + switch (build_list[i].enum_idx) + { + case MENU_ENUM_LABEL_AI_SERVICE_MODE: + case MENU_ENUM_LABEL_AI_SERVICE_URL: + case MENU_ENUM_LABEL_AI_SERVICE_PAUSE: + case MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG: + case MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG: + if (ai_service_enable) + build_list[i].checked = true; + break; + default: + break; + } + } + + for (i = 0; i < ARRAY_SIZE(build_list); i++) + { + if (!build_list[i].checked && !include_everything) + continue; + if (menu_displaylist_parse_settings_enum(list, build_list[i].enum_idx, build_list[i].parse_type, false) == 0) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ff78f75837..5496e1b79c 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -14588,6 +14588,9 @@ static bool setting_append_list( general_write_handler, general_read_handler, SD_FLAG_NONE); + (*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh; + (*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh; + (*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh; CONFIG_BOOL( list, list_info,