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: Fix Back button behavior

Clicking the Back button may navigate to a non-menu hierarchy level.

[Example]

menu "menu1"

config A
bool "A"
default y

config B
bool "B"
depends on A
default y

menu "menu2"
depends on B

config C
bool "C"
default y

endmenu

endmenu

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

menu "menu1"
\-- A
\-- B
\-- menu "menu2"
\-- C

In Single view, visit "menu2" and click the Back button. It should go up
to "menu1" and show A, B and "menu2", but instead goes up to A and show
only B and "menu2". This is a bug in on_back_clicked().

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

+1 -5
+1 -5
scripts/kconfig/gconf.c
··· 553 553 /* toolbar handlers */ 554 554 static void on_back_clicked(GtkButton *button, gpointer user_data) 555 555 { 556 - enum prop_type ptype; 556 + browsed = menu_get_parent_menu(browsed) ?: &rootmenu; 557 557 558 - browsed = browsed->parent; 559 - ptype = browsed->prompt ? browsed->prompt->type : P_UNKNOWN; 560 - if (ptype != P_MENU) 561 - browsed = browsed->parent; 562 558 recreate_tree(); 563 559 564 560 if (browsed == &rootmenu)