mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	kconfig: gconf: fix behavior of a menu under a symbol in split view
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>
			
			
This commit is contained in:
		
							parent
							
								
									1f937cdf32
								
							
						
					
					
						commit
						0c82f50a06
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -803,7 +803,7 @@ static gboolean on_treeview2_button_press_event(GtkWidget *widget, | ||||||
| 		enum prop_type ptype; | 		enum prop_type ptype; | ||||||
| 		ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; | 		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
 | 			// goes down into menu
 | ||||||
| 			browsed = menu; | 			browsed = menu; | ||||||
| 			display_tree_part(); | 			display_tree_part(); | ||||||
|  | @ -953,8 +953,7 @@ static void _display_tree(GtkTreeStore *tree, struct menu *menu, | ||||||
| 		gtk_tree_store_append(tree, &iter, parent); | 		gtk_tree_store_append(tree, &iter, parent); | ||||||
| 		set_node(tree, &iter, child); | 		set_node(tree, &iter, child); | ||||||
| 
 | 
 | ||||||
| 		if ((view_mode != FULL_VIEW) && (ptype == P_MENU) | 		if ((view_mode == SINGLE_VIEW) && (ptype == P_MENU)) | ||||||
| 		    && (tree == tree2)) |  | ||||||
| 			continue; | 			continue; | ||||||
| /*
 | /*
 | ||||||
| 		if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) | 		if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Masahiro Yamada
						Masahiro Yamada