patch-2.1.86 linux/scripts/header.tk
Next file: linux/scripts/tkgen.c
Previous file: linux/net/x25/x25_subr.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Mon Feb 9 16:12:56 1998
- Orig file:
v2.1.85/linux/scripts/header.tk
- Orig date:
Mon Jan 5 01:41:01 1998
diff -u --recursive --new-file v2.1.85/linux/scripts/header.tk linux/scripts/header.tk
@@ -237,7 +237,7 @@
then { puts $file1 "$varname=y"; \
puts $file2 "#define $varname 1" } \
else { \
- error "Attempting to write value for variable that is not configured ($varname)." \
+ puts stdout "ERROR - Attempting to write value for unconfigured variable ($varname)." \
}
}
@@ -281,7 +281,21 @@
pack $w.x$line.l -side right -fill both -expand on
}
-proc toggle_switch {w mnum line text variable} {
+proc toggle_switch2 {w mnum line text variable} {
+ frame $w.x$line -relief sunken
+ radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
+ -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+ radiobutton $w.x$line.m -text "-" -variable $variable -value 2 \
+ -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+ radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \
+ -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+
+ option_name $w $mnum $line $text $variable
+
+ pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y
+}
+
+proc toggle_switch3 {w mnum line text variable} {
frame $w.x$line -relief sunken
radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
-relief groove -width 2 -command "update_menu$mnum .menu$mnum"
@@ -296,13 +310,13 @@
}
proc bool {w mnum line text variable} {
- toggle_switch $w $mnum $line $text $variable
+ toggle_switch2 $w $mnum $line $text $variable
$w.x$line.m configure -state disabled
pack $w.x$line -anchor w -fill both -expand on
}
proc tristate {w mnum line text variable } {
- toggle_switch $w $mnum $line $text $variable
+ toggle_switch3 $w $mnum $line $text $variable
pack $w.x$line -anchor w -fill both -expand on
}
@@ -336,7 +350,7 @@
frame $w.x$line
menubutton $w.x$line.x -textvariable $variable -menu \
$w.x$line.x.menu -relief raised \
- -width 15 -anchor w
+ -anchor w
option_name $w $mnum $line $text $helpidx
pack $w.x$line.x -anchor w -side right -fill y
pack $w.x$line -anchor w -fill both -expand on
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov