summaryrefslogtreecommitdiffstats
path: root/library/xmfbox.tcl
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-08-11 21:24:25 (GMT)
committerdkf <dkf@noemail.net>2004-08-11 21:24:25 (GMT)
commitec7090c73943a8e4e872ae73c36cad7f91d23a92 (patch)
tree5bc1e4d8ab829d16aa4f1b3114e62eab33c662f2 /library/xmfbox.tcl
parent5fa0775379fdfd2f0febc591aed098aded782795 (diff)
downloadtk-ec7090c73943a8e4e872ae73c36cad7f91d23a92.zip
tk-ec7090c73943a8e4e872ae73c36cad7f91d23a92.tar.gz
tk-ec7090c73943a8e4e872ae73c36cad7f91d23a92.tar.bz2
More fixing of [Bug 987169] and simple support for [FRQ 979101]
FossilOrigin-Name: 595dd0d3fc2f014355adb1d72c8d2c2b79b9e3c9
Diffstat (limited to 'library/xmfbox.tcl')
-rw-r--r--library/xmfbox.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 67e2804..db79815 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -4,7 +4,7 @@
# Unix platform. This implementation is used only if the
# "::tk_strictMotif" flag is set.
#
-# RCS: @(#) $Id: xmfbox.tcl,v 1.25 2003/02/18 21:19:35 hobbs Exp $
+# RCS: @(#) $Id: xmfbox.tcl,v 1.26 2004/08/11 21:24:25 dkf Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Scriptics Corporation
@@ -54,9 +54,10 @@ proc ::tk::MotifFDialog {type args} {
# restore any grab that was in effect.
vwait ::tk::Priv(selectFilePath)
+ set result $Priv(selectFilePath)
::tk::RestoreFocusGrab $w $data(sEnt) withdraw
- return $Priv(selectFilePath)
+ return $result
}
# ::tk::MotifFDialog_Create --
@@ -378,6 +379,8 @@ proc ::tk::MotifFDialog_BuildUI {w} {
bind $data(fEnt) <Return> [list tk::MotifFDialog_ActivateFEnt $w]
bind $data(sEnt) <Return> [list tk::MotifFDialog_ActivateSEnt $w]
+ bind $w <Escape> [list tk::MotifFDialog_CancelCmd $w]
+ bind $w.bot <Destroy> {set ::tk::Priv(selectFilePath) {}}
wm protocol $w WM_DELETE_WINDOW [list tk::MotifFDialog_CancelCmd $w]
}