[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210418055123.14085-1-rdunlap@infradead.org>
Date: Sat, 17 Apr 2021 22:51:22 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>,
Masahiro Yamada <masahiroy@...nel.org>,
linux-kbuild@...r.kernel.org
Subject: [PATCH 1/2] 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@...radead.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org
---
scripts/kconfig/gconf.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- linux-next-20210416.orig/scripts/kconfig/gconf.c
+++ linux-next-20210416/scripts/kconfig/gconf.c
@@ -1048,8 +1048,13 @@ static gchar **fill_row(struct menu *men
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))
@@ -1060,7 +1065,6 @@ static gchar **fill_row(struct menu *men
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;
Powered by blists - more mailing lists