[PATCH] qconf: show red links for disabled options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When 'Show debug info' is checked then a list of links
to dependant symbols is shown in info view right bottom pane.

Currently all links are in standard blue. With this patch
links to disabled symbols are shown in red instead.

This, together with 'Show all options', allows to quickly
check out why a given option is hidden.

Signed-off-by: Marco Costalba <[email protected]>
---

I understand that color coding could be a poor choice due to people
with color differencing problems.

I chose this anyway to avoid crufting the output with additional signs/symbols,
this could became very ugly in case of long option lists.


  scripts/kconfig/qconf.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index e4eeb59..e4927c1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1157,9 +1157,14 @@ void ConfigInfoView::expr_print_help(void
*data, struct symbol *sym, const char
  	QString str2 = print_filter(str);

  	if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
+		bool disabled = (print_filter(sym_get_string_value(sym)) != "y");
+		if (disabled)
+			*text += "<font color=\"red\">";
  		*text += QString().sprintf("<a href=\"s%p\">", sym);
 		*text += str2;
 		*text += "</a>";
+		if (disabled)
+			*text += "</font>";
 	} else
 		*text += str2;
 }
-- 
1.5.3.rc4.67.gf9286
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux