From: Matej Laitl <strohel@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>, Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] kconfig: menuconfig: change "---" items to "-*-", "-M-" or "- -"
Date: Tue, 18 Sep 2007 20:16:00 +0200 [thread overview]
Message-ID: <200709182016.02436.strohel@gmail.com> (raw)
In-Reply-To: <200709152004.11930.strohel@gmail.com>
This little patch changes notation of unchangeable menuconfig items to always
reflect the current state of inclusion of a feature.
Signed-off-by: Matěj Laitl <strohel@gmail.com>
---
Hi again, Sam, Roman, Randy.
Instead of incorporating all changes into a single patch, I decided to split
things into more rather independent patches.
Expect another one extending show_help(). (which ATM needs more polishing
before being posted)
scripts/kconfig/mconf.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..38ffbe1 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -542,14 +542,19 @@ static void build_conf(struct menu *menu)
return;
}
} else {
+ val = sym_get_tristate_value(sym);
+ switch (val) {
+ case yes: ch = '*'; break;
+ case mod: ch = 'M'; break;
+ default: ch = ' '; break;
+ }
if (menu == current_menu) {
- item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ item_make("-%c-%*c%s", ch, indent + 1, ' ', menu_get_prompt(menu));
item_set_tag(':');
item_set_data(menu);
goto conf_childs;
}
child_count++;
- val = sym_get_tristate_value(sym);
if (sym_is_choice_value(sym) && val == yes) {
item_make(" ");
item_set_tag(':');
@@ -558,22 +563,17 @@ static void build_conf(struct menu *menu)
switch (type) {
case S_BOOLEAN:
if (sym_is_changable(sym))
- item_make("[%c]", val == no ? ' ' : '*');
+ item_make("[%c]", ch);
else
- item_make("---");
+ item_make("-%c-", ch);
item_set_tag('t');
item_set_data(menu);
break;
case S_TRISTATE:
- switch (val) {
- case yes: ch = '*'; break;
- case mod: ch = 'M'; break;
- default: ch = ' '; break;
- }
if (sym_is_changable(sym))
item_make("<%c>", ch);
else
- item_make("---");
+ item_make("-%c-", ch);
item_set_tag('t');
item_set_data(menu);
break;
--
1.5.1.6
prev parent reply other threads:[~2007-09-18 18:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-15 18:04 [PATCH v2] menuconfig: distinguish between selected-by-another options and comments Matej Laitl
2007-09-15 18:20 ` Matej Laitl
2007-09-15 18:38 ` Jan Engelhardt
2007-09-15 18:44 ` Matej Laitl
2007-09-16 0:34 ` Randy Dunlap
2007-09-16 11:17 ` Sam Ravnborg
2007-09-16 17:10 ` Roman Zippel
2007-09-16 18:09 ` Sam Ravnborg
2007-09-16 19:38 ` Roman Zippel
2007-09-16 17:07 ` Roman Zippel
2007-09-16 17:44 ` [PATCH v3] " Matej Laitl
2007-09-16 17:59 ` Roman Zippel
2007-09-16 18:24 ` Matej Laitl
2007-09-16 19:36 ` Roman Zippel
2007-09-16 21:08 ` Matej Laitl
2007-09-16 18:41 ` [PATCH v2] " Sam Ravnborg
2007-09-16 19:00 ` Matej Laitl
2007-09-18 18:16 ` Matej Laitl [this message]
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=200709182016.02436.strohel@gmail.com \
--to=strohel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sam@ravnborg.org \
--cc=zippel@linux-m68k.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 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.