From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Dirk Gouders <dirk@gouders.net>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2] mconf/nconf: mark empty menus/menuconfigs different from non-empty ones
Date: Sun, 19 May 2013 17:14:17 +0200 [thread overview]
Message-ID: <20130519151417.GB3339@free.fr> (raw)
In-Reply-To: <1368794526-7875-1-git-send-email-dirk@gouders.net>
Dirk, All,
On 2013-05-17 14:42 +0200, Dirk Gouders spake thusly:
> Submenus are sometimes empty and it would be nice if there is
> something that notifies us that we should not expect any content
> _before_ we enter a submenu.
>
> A new function menu_is_empty() was introduced and empty menus and
> menuconfigs are now marked by "----" as opposed to non-empty
> ones that are marked by "--->".
>
> This scheme was suggested by "Yann E. MORIN" <yann.morin.1998@free.fr>.
>
> Signed-off-by: Dirk Gouders <dirk@gouders.net>
> ---
[--SNIP--]
> diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
> index ccb71ae..80b289c 100644
> --- a/scripts/kconfig/mconf.c
> +++ b/scripts/kconfig/mconf.c
[--SNIP--]
> @@ -497,9 +497,14 @@ static void build_conf(struct menu *menu)
> item_make("%s%*c%s",
> menu->data ? "-->" : "++>",
> indent + 1, ' ', prompt);
> - } else
> - item_make(" %*c%s --->", indent + 1, ' ', prompt);
> -
> + } else {
> + if (menu_is_empty(menu))
> + item_make(" %*c%s ----",
> + indent + 1, ' ', prompt);
> + else
> + item_make(" %*c%s --->",
> + indent + 1, ' ', prompt);
> + }
What about:
item_make(" %*c%s %s",
indent + 1, ' ', prompt,
menu_is_empty(menu) ? "----" : "--->" );
[--SNIP--]
> diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
> index dbf31ed..8b31180 100644
> --- a/scripts/kconfig/nconf.c
> +++ b/scripts/kconfig/nconf.c
[--SNIP--]
> @@ -757,11 +757,18 @@ static void build_conf(struct menu *menu)
> "%s%*c%s",
> menu->data ? "-->" : "++>",
> indent + 1, ' ', prompt);
> - } else
> - item_make(menu, 'm',
> - " %*c%s --->",
> - indent + 1,
> - ' ', prompt);
> + } else {
> + if (menu_is_empty(menu))
> + item_make(menu, 'm',
> + " %*c%s ----",
> + indent + 1,
> + ' ', prompt);
> + else
> + item_make(menu, 'm',
> + " %*c%s --->",
> + indent + 1,
> + ' ', prompt);
> + }
Ditto.
Otherwise, looks good to me.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2013-05-19 15:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 14:05 [RFC] mconf: suppress empty submenus Dirk Gouders
2013-05-15 14:05 ` [PATCH] " Dirk Gouders
2013-05-16 8:24 ` [RFC] " Dirk Gouders
2013-05-16 23:04 ` Yann E. MORIN
2013-05-17 4:22 ` Dirk Gouders
2013-05-17 10:28 ` [RFC] mconf: mark empty menus/menuconfigs different form non-empty ones Dirk Gouders
2013-05-17 10:28 ` [PATCH] " Dirk Gouders
2013-05-17 12:42 ` [PATCH v2] mconf/nconf: mark empty menus/menuconfigs different from " Dirk Gouders
2013-05-19 15:14 ` Yann E. MORIN [this message]
2013-05-19 19:49 ` [PATCH v3] " Dirk Gouders
2013-05-20 15:50 ` Yann E. MORIN
2013-05-19 9:08 ` [RFC] mconf: mark empty menus/menuconfigs different form " Yann E. MORIN
2013-05-19 16:22 ` Dirk Gouders
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130519151417.GB3339@free.fr \
--to=yann.morin.1998@free.fr \
--cc=dirk@gouders.net \
--cc=linux-kbuild@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox