Skip to content

Commit 4cc7e6c

Browse files
committed
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 <[email protected]>
1 parent a7efb16 commit 4cc7e6c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/kconfig/gconf.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ static gchar **fill_row(struct menu *menu)
10471047
row[COL_NAME] = g_strdup(sym->name);
10481048

10491049
sym_calc_value(sym);
1050-
sym->flags &= ~SYMBOL_CHANGED;
1050+
menu->flags &= ~MENU_CHANGED;
10511051

10521052
if (sym_is_choice(sym)) { // parse childs for getting final value
10531053
struct menu *child;
@@ -1273,7 +1273,7 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
12731273
else
12741274
goto reparse; // next child
12751275
}
1276-
} else if (sym && (sym->flags & SYMBOL_CHANGED)) {
1276+
} else if (sym && (child1->flags & MENU_CHANGED)) {
12771277
set_node(child2, menu1, fill_row(menu1));
12781278
}
12791279

@@ -1289,7 +1289,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
12891289
/* Display the whole tree (single/split/full view) */
12901290
static void display_tree(struct menu *menu)
12911291
{
1292-
struct symbol *sym;
12931292
struct property *prop;
12941293
struct menu *child;
12951294
enum prop_type ptype;
@@ -1301,11 +1300,9 @@ static void display_tree(struct menu *menu)
13011300

13021301
for (child = menu->list; child; child = child->next) {
13031302
prop = child->prompt;
1304-
sym = child->sym;
13051303
ptype = prop ? prop->type : P_UNKNOWN;
13061304

1307-
if (sym)
1308-
sym->flags &= ~SYMBOL_CHANGED;
1305+
menu->flags &= ~MENU_CHANGED;
13091306

13101307
if ((view_mode == SPLIT_VIEW)
13111308
&& !(child->flags & MENU_ROOT) && (tree == tree1))

0 commit comments

Comments
 (0)