lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5bfff550708180706n48e67d24qc74847ea4462c149@mail.gmail.com>
Date:	Sat, 18 Aug 2007 16:06:05 +0200
From:	"Marco Costalba" <mcostalba@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	zippel@...ux-m68k.org, sam@...nborg.org
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@...il.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ