]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kconfig: gconf: fix behavior of a menu under a symbol in split view
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 29 Jun 2025 18:43:27 +0000 (03:43 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 26 Jul 2025 06:31:29 +0000 (15:31 +0900)
A menu can be created under a symbol.

[Example]

  menu "outer menu"

  config A
          bool "A"

  menu "inner menu"
          depends on A

  config B
          bool "B"

  endmenu

  endmenu

After being re-parented by menu_finalize(), the menu tree is structured
like follows:

  menu "outer menu"
  \-- A
      \-- menu "inner menu"
          \-- B

In split view, the symbol A is shown in the right pane, so all of its
descendants must also be shown there. This has never worked correctly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/gconf.c

index 28c4b5b374489bc2762885aa53ea318eb550c5d0..7397a51641a79741bf30e84ee6f8a5fd1430110e 100644 (file)
@@ -803,7 +803,7 @@ static gboolean on_treeview2_button_press_event(GtkWidget *widget,
                enum prop_type ptype;
                ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
 
-               if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) {
+               if (ptype == P_MENU && view_mode == SINGLE_VIEW && col == COL_OPTION) {
                        // goes down into menu
                        browsed = menu;
                        display_tree_part();
@@ -953,8 +953,7 @@ static void _display_tree(GtkTreeStore *tree, struct menu *menu,
                gtk_tree_store_append(tree, &iter, parent);
                set_node(tree, &iter, child);
 
-               if ((view_mode != FULL_VIEW) && (ptype == P_MENU)
-                   && (tree == tree2))
+               if ((view_mode == SINGLE_VIEW) && (ptype == P_MENU))
                        continue;
 /*
                if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))