lkml.org 
[lkml]   [2007]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] qconf: show red links for disabled options
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 <mcostalba@gmail.com>
---

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-08-18 16:09    [W:0.041 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site