diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2021-04-17 22:51:22 -0700 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-19 14:57:16 +0900 |
commit | 5fb35ec10bb0665080c8de8a360fb4dba9a0f73f (patch) | |
tree | aa5d902ef062411e6f748ad150d90c402faf9f0d | |
parent | ed63ef7796979835d7cfb4dc2d108b6eeeb2b7c2 (diff) | |
download | linux-5fb35ec10bb0665080c8de8a360fb4dba9a0f73f.tar.bz2 |
kconfig: highlight gconfig 'comment' lines with '***'
Mark Kconfig "comment" lines with "*** <commentstring> ***"
so that it is clear that these lines are comments and not some
kconfig item that cannot be modified.
This is helpful in some menus to be able to provide a menu
"sub-heading" for groups of similar config items.
This also makes the comments be presented in a way that is
similar to menuconfig and nconfig.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r-- | scripts/kconfig/gconf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 7698eea6fb6e..17adabfd6e6b 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -1044,8 +1044,13 @@ static gchar **fill_row(struct menu *menu) g_free(row[i]); bzero(row, sizeof(row)); + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + row[COL_OPTION] = - g_strdup_printf("%s %s", menu_get_prompt(menu), + g_strdup_printf("%s %s %s %s", + ptype == P_COMMENT ? "***" : "", + menu_get_prompt(menu), + ptype == P_COMMENT ? "***" : "", sym && !sym_has_value(sym) ? "(NEW)" : ""); if (opt_mode == OPT_ALL && !menu_is_visible(menu)) @@ -1056,7 +1061,6 @@ static gchar **fill_row(struct menu *menu) else row[COL_COLOR] = g_strdup("Black"); - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; switch (ptype) { case P_MENU: row[COL_PIXBUF] = (gchar *) xpm_menu; |