summaryrefslogtreecommitdiffstats
path: root/library/demos
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-09-10 20:46:17 (GMT)
committerdkf <dkf@noemail.net>2004-09-10 20:46:17 (GMT)
commita74cdb34fcfd352e2d343775b819f7eaf2e61994 (patch)
tree29580e8f14c8df24363ea29a33db3fb41fa3313d /library/demos
parentea1b8344e1ebeb6761782d3ed69f73bb1e6e4d70 (diff)
downloadtk-a74cdb34fcfd352e2d343775b819f7eaf2e61994.zip
tk-a74cdb34fcfd352e2d343775b819f7eaf2e61994.tar.gz
tk-a74cdb34fcfd352e2d343775b819f7eaf2e61994.tar.bz2
Prevent tk_strictMotif poisoning of the Widget demo [Bug 1013942]
FossilOrigin-Name: ce3ce0656c7df14c5c83262451b92a6ef2f711da
Diffstat (limited to 'library/demos')
-rw-r--r--library/demos/filebox.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/demos/filebox.tcl b/library/demos/filebox.tcl
index 860b29b..3fae38d 100644
--- a/library/demos/filebox.tcl
+++ b/library/demos/filebox.tcl
@@ -2,7 +2,7 @@
#
# This demonstration script prompts the user to select a file.
#
-# RCS: @(#) $Id: filebox.tcl,v 1.4 2003/08/20 23:02:18 hobbs Exp $
+# RCS: @(#) $Id: filebox.tcl,v 1.5 2004/09/10 20:46:19 dkf Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -33,10 +33,14 @@ foreach i {open save} {
pack $f -fill x -padx 1c -pady 3
}
-if {![string compare $tcl_platform(platform) unix]} {
+if {$tcl_platform(platform) eq "unix"} {
checkbutton $w.strict -text "Use Motif Style Dialog" \
-variable tk_strictMotif -onvalue 1 -offvalue 0
pack $w.strict -anchor c
+
+ # This binding ensures that we don't run the rest of the demos
+ # with motif style interactions
+ bind $w.strict <Destroy> {set tk_strictMotif 0}
}
proc fileDialog {w ent operation} {