Currently, bool choices have a checkbox, but tristate choices do not. It is opposite. Bool choices should not have a checkbox, as they are fixed to 'y' since commit 6a1215888e23 ("kconfig: remove 'optional' property support"). Tristate choices, however, should have a checkbox to allow users to toggle the value.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -1054,8 +1054,6 @@ static gchar **fill_row(struct menu *menu) · 1053 unmodified lines | ||
| 1054 | 1054 | struct symbol *def_sym = sym_get_choice_value(sym); |
| 1055 | 1055 | struct menu *def_menu = NULL; |
| 1056 | 1056 | |
| 1057 | − row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); | |
| 1058 | − | |
| 1059 | 1057 | for (child = menu->list; child; child = child->next) { |
| 1060 | 1058 | if (menu_is_visible(child) |
| 1061 | 1059 | && child->sym == def_sym) |
| @@ -1065,6 +1063,11 @@ static gchar **fill_row(struct menu *menu) · 3 unmodified lines | ||
| 1065 | 1063 | if (def_menu) |
| 1066 | 1064 | row[COL_VALUE] = |
| 1067 | 1065 | g_strdup(menu_get_prompt(def_menu)); |
| 1066 | + | |
| 1067 | + if (sym_get_type(sym) == S_BOOLEAN) { | |
| 1068 | + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); | |
| 1069 | + return row; | |
| 1070 | + } | |
| 1068 | 1071 | } |
| 1069 | 1072 | if (sym->flags & SYMBOL_CHOICEVAL) |
| 1070 | 1073 | row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); |
| @@ -1072,11 +1075,6 @@ static gchar **fill_row(struct menu *menu) · 1 unmodified line | ||
| 1072 | 1075 | stype = sym_get_type(sym); |
| 1073 | 1076 | switch (stype) { |
| 1074 | 1077 | case S_BOOLEAN: |
| 1075 | − if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) | |
| 1076 | − row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); | |
| 1077 | − if (sym_is_choice(sym)) | |
| 1078 | − break; | |
| 1079 | − /* fall through */ | |
| 1080 | 1078 | case S_TRISTATE: |
| 1081 | 1079 | val = sym_get_tristate_value(sym); |
| 1082 | 1080 | switch (val) { |