patch-1.3.88 linux/scripts/header.tk

Next file: linux/Documentation/Changes
Previous file: linux/net/ipv4/tcp_timer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.87/linux/scripts/header.tk linux/scripts/header.tk
@@ -1,14 +1,9 @@
 #
-# Create a "reference" object to steal colors from.
-#
-button .ref
-
-#
 # This is a handy replacement for ".widget cget" that requires neither tk4
 # nor additional source code uglification.
 #
 proc cget { w option } {
-	return [lindex [$w configure $option] 4]
+	return "[lindex [$w configure $option] 4]"
 }
 
 #
@@ -18,11 +13,24 @@
 #
 proc vfix { var } {
 	global $var
-	if [catch {set $var [subst $$var]}] {
+	if [ catch {eval concat $$var} ] {
 		puts stdout "WARNING - broken Config.in!  $var was not declared!"
 		set $var 0
 	}
 }
+
+#
+# Create a "reference" object to steal colors from.
+#
+button .ref
+#
+# On monochrome displays, -disabledforeground is blank by default; that's
+# bad.  Fill it with -foreground instead.
+#
+if { [cget .ref -disabledforeground] == "" } {
+	.ref configure -disabledforeground [cget .ref -foreground]
+}
+
 
 #
 # Define some macros we will need to parse the config.in file.


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this