summaryrefslogtreecommitdiffstats
path: root/library/xmfbox.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-10-27 16:37:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-10-27 16:37:57 (GMT)
commit092d76ba6e79de38e7fab83e919cbf9b11a3e927 (patch)
tree59ab7895ef2910d113a343516403596725cbca1b /library/xmfbox.tcl
parent0775798a39573c9ab7559d2a2d246e49e638eabb (diff)
downloadtk-092d76ba6e79de38e7fab83e919cbf9b11a3e927.zip
tk-092d76ba6e79de38e7fab83e919cbf9b11a3e927.tar.gz
tk-092d76ba6e79de38e7fab83e919cbf9b11a3e927.tar.bz2
* library/xmfbox.tcl (MotifFDialog_BuildUI): Fix [Bug 987169] in
the Motif file dialogs as well. Backport of DKF bug fix.
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..6093da3 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.25.2.1 2004/10/27 16:37:59 dgp 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]
}