Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: gconf: use MENU_CHANGED instead of SYMBOL_CHANGED

SYMBOL_CHANGED and MENU_CHANGED are used to update GUI frontends
when the symbol value is changed. These are used inconsistently:
SYMBOL_CHANGED in gconf.c and MENU_CHANGE in qconf.cc.

MENU_CHANGED works more properly when a symbol has multiple prompts
(although such code is not ideal).

[test code]

config FOO
bool "foo prompt 1"

config FOO
bool "foo prompt 2"

In gconfig, if one of the two checkboxes is clicked, only the first
one is toggled. In xconfig, the two checkboxes work in sync.

Replace SYMBOL_CHANGED in gconf.c with MENU_CHANGED to align with
the xconfig behavior.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+3 -6
+3 -6
scripts/kconfig/gconf.c
··· 1047 1047 row[COL_NAME] = g_strdup(sym->name); 1048 1048 1049 1049 sym_calc_value(sym); 1050 - sym->flags &= ~SYMBOL_CHANGED; 1050 + menu->flags &= ~MENU_CHANGED; 1051 1051 1052 1052 if (sym_is_choice(sym)) { // parse childs for getting final value 1053 1053 struct menu *child; ··· 1273 1273 else 1274 1274 goto reparse; // next child 1275 1275 } 1276 - } else if (sym && (sym->flags & SYMBOL_CHANGED)) { 1276 + } else if (sym && (child1->flags & MENU_CHANGED)) { 1277 1277 set_node(child2, menu1, fill_row(menu1)); 1278 1278 } 1279 1279 ··· 1289 1289 /* Display the whole tree (single/split/full view) */ 1290 1290 static void display_tree(struct menu *menu) 1291 1291 { 1292 - struct symbol *sym; 1293 1292 struct property *prop; 1294 1293 struct menu *child; 1295 1294 enum prop_type ptype; ··· 1300 1301 1301 1302 for (child = menu->list; child; child = child->next) { 1302 1303 prop = child->prompt; 1303 - sym = child->sym; 1304 1304 ptype = prop ? prop->type : P_UNKNOWN; 1305 1305 1306 - if (sym) 1307 - sym->flags &= ~SYMBOL_CHANGED; 1306 + menu->flags &= ~MENU_CHANGED; 1308 1307 1309 1308 if ((view_mode == SPLIT_VIEW) 1310 1309 && !(child->flags & MENU_ROOT) && (tree == tree1))