Skip to content

Commit 5fb35ec

Browse files
rddunlapmasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent ed63ef7 commit 5fb35ec

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/kconfig/gconf.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,13 @@ static gchar **fill_row(struct menu *menu)
10441044
g_free(row[i]);
10451045
bzero(row, sizeof(row));
10461046

1047+
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
1048+
10471049
row[COL_OPTION] =
1048-
g_strdup_printf("%s %s", menu_get_prompt(menu),
1050+
g_strdup_printf("%s %s %s %s",
1051+
ptype == P_COMMENT ? "***" : "",
1052+
menu_get_prompt(menu),
1053+
ptype == P_COMMENT ? "***" : "",
10491054
sym && !sym_has_value(sym) ? "(NEW)" : "");
10501055

10511056
if (opt_mode == OPT_ALL && !menu_is_visible(menu))
@@ -1056,7 +1061,6 @@ static gchar **fill_row(struct menu *menu)
10561061
else
10571062
row[COL_COLOR] = g_strdup("Black");
10581063

1059-
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
10601064
switch (ptype) {
10611065
case P_MENU:
10621066
row[COL_PIXBUF] = (gchar *) xpm_menu;

0 commit comments

Comments
 (0)