Skip to content

Commit 6d4d442

Browse files
committed
kconfig: gconf: fix single view to display dependent symbols correctly
In the following example, the symbol C was never displayed in Single view. Fix the recursion logic so that all symbols are shown. menu "menu" config A bool "A" config B bool "B" depends on A config C bool "C" depends on B endmenu Signed-off-by: Masahiro Yamada <[email protected]>
1 parent b9f7539 commit 6d4d442

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

scripts/kconfig/gconf.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -914,9 +914,7 @@ static gboolean on_treeview1_button_press_event(GtkWidget *widget,
914914
static void _display_tree(GtkTreeStore *tree, struct menu *menu,
915915
GtkTreeIter *parent)
916916
{
917-
struct property *prop;
918917
struct menu *child;
919-
enum prop_type ptype;
920918
GtkTreeIter iter;
921919

922920
for (child = menu->list; child; child = child->next) {
@@ -929,9 +927,6 @@ static void _display_tree(GtkTreeStore *tree, struct menu *menu,
929927
if (child->type == M_IF)
930928
continue;
931929

932-
prop = child->prompt;
933-
ptype = prop ? prop->type : P_UNKNOWN;
934-
935930
if ((view_mode == SPLIT_VIEW)
936931
&& !(child->flags & MENU_ROOT) && (tree == tree1))
937932
continue;
@@ -943,16 +938,7 @@ static void _display_tree(GtkTreeStore *tree, struct menu *menu,
943938
gtk_tree_store_append(tree, &iter, parent);
944939
set_node(tree, &iter, child);
945940

946-
if ((view_mode == SINGLE_VIEW) && (ptype == P_MENU))
947-
continue;
948-
/*
949-
if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
950-
|| (view_mode == FULL_VIEW)
951-
|| (view_mode == SPLIT_VIEW))*/
952-
953-
if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
954-
|| (view_mode == FULL_VIEW)
955-
|| (view_mode == SPLIT_VIEW))
941+
if (view_mode != SINGLE_VIEW || child->type != M_MENU)
956942
_display_tree(tree, child, &iter);
957943
}
958944
}

0 commit comments

Comments
 (0)