patch-2.4.0-test2 linux/scripts/header.tk

Next file: linux/scripts/lxdialog/Makefile
Previous file: linux/scripts/cramfs/mkcramfs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/scripts/header.tk linux/scripts/header.tk
@@ -110,6 +110,8 @@
 	wm geometry $w +$winx+$winy
 }
 
+bind all <Alt-q> {maybe_exit .maybe}
+
 proc maybe_exit { w } {
 	catch {destroy $w}
 	toplevel $w -class Dialog
@@ -128,6 +130,8 @@
 		-width 20 -command "destroy $w; focus $oldFocus"
 	pack $w.f.back $w.f.canc -side left -pady 10 -padx 45
 	pack $w.f -pady 10 -side bottom -padx 10 -anchor w
+  	bind $w <Return> "exit"
+    	bind $w <Escape> "destroy $w; focus $oldFocus"
 	focus $w
 	global winx; global winy
 	set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
@@ -402,6 +406,7 @@
 
 proc menusplit {w m n} {
 	if { $n > 2 } then {
+		update idletasks
 		set menuoptsize [expr [$m yposition 2] - [$m yposition 1]]   
 		set maxsize [winfo screenheight $w]
 		set splitpoint [expr $maxsize * 4 / 5 / $menuoptsize - 1]
@@ -411,6 +416,10 @@
 	}
 }
 
+proc menutitle {text menu w} {
+	wm title $w "$text"
+}
+
 proc submenu { w mnum line text subnum } {
 	frame $w.x$line
 	button $w.x$line.l -text "" -width 15 -relief groove
@@ -531,6 +540,9 @@
 	wm maxsize $w [winfo width $w] $sizy
 }
 
+bind all <Alt-s> { catch {exec cp -f .config .config.old}; \
+		writeconfig .config include/linux/autoconf.h; wrapup .wrap }
+
 proc wrapup {w }  {
 	catch {destroy $w}
 	toplevel $w -class Dialog
@@ -554,6 +566,7 @@
 	pack $w.f.back -side bottom -pady 10 -anchor s
 	pack $w.f -pady 10 -side top -padx 10 -anchor s
 	focus $w
+        bind $w <Return> "exit"
 	global winx; global winy
 	set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
 	wm geometry $w +$winx+$winy

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)