* [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***'
@ 2021-04-18 5:51 Randy Dunlap
2021-04-18 5:51 ` [PATCH 2/2] kconfig: highlight xconfig " Randy Dunlap
2021-04-19 6:00 ` [PATCH 1/2] kconfig: highlight gconfig " Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-04-18 5:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy Dunlap, Masahiro Yamada, linux-kbuild
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>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] kconfig: highlight xconfig 'comment' lines with '***'
2021-04-18 5:51 [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***' Randy Dunlap
@ 2021-04-18 5:51 ` Randy Dunlap
2021-04-19 6:00 ` [PATCH 1/2] kconfig: highlight gconfig " Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-04-18 5:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy Dunlap, Masahiro Yamada, linux-kbuild
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>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
---
scripts/kconfig/qconf.cc | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20210416.orig/scripts/kconfig/qconf.cc
+++ linux-next-20210416/scripts/kconfig/qconf.cc
@@ -122,6 +122,7 @@ void ConfigItem::updateMenu(void)
goto set_prompt;
case P_COMMENT:
setIcon(promptColIdx, QIcon());
+ prompt = "*** " + prompt + " ***";
goto set_prompt;
default:
;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***'
2021-04-18 5:51 [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***' Randy Dunlap
2021-04-18 5:51 ` [PATCH 2/2] kconfig: highlight xconfig " Randy Dunlap
@ 2021-04-19 6:00 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-04-19 6:00 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list
On Sun, Apr 18, 2021 at 2:51 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 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>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: linux-kbuild@vger.kernel.org
> ---
Both applied to linux-kbuild. Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-19 6:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 5:51 [PATCH 1/2] kconfig: highlight gconfig 'comment' lines with '***' Randy Dunlap
2021-04-18 5:51 ` [PATCH 2/2] kconfig: highlight xconfig " Randy Dunlap
2021-04-19 6:00 ` [PATCH 1/2] kconfig: highlight gconfig " Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.