summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-11-12 00:04:32 (GMT)
committerhobbs <hobbs>2003-11-12 00:04:32 (GMT)
commit6d0d80c1290840239c1332b8a766302b464e6ccd (patch)
treeee662b9f75ff4812fea26e8ae83d5d7389175fe7 /library
parentcf2d11dba3a14674460a3022a91de2d4618e6365 (diff)
downloadtk-6d0d80c1290840239c1332b8a766302b464e6ccd.zip
tk-6d0d80c1290840239c1332b8a766302b464e6ccd.tar.gz
tk-6d0d80c1290840239c1332b8a766302b464e6ccd.tar.bz2
(::tk::dialog::file::ActivateEnt): allow typing filename into
entry when tk_getOpenFile -multiple 1 is specified. [Bug #788069]
Diffstat (limited to 'library')
-rw-r--r--library/tkfbox.tcl13
1 files changed, 10 insertions, 3 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index f5431cd..cc99e86 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.2 2003/11/11 22:39:36 hobbs Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.3 2003/11/12 00:04:32 hobbs Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -1509,10 +1509,17 @@ proc ::tk::dialog::file::ActivateEnt {w} {
# names as a true list, watching out for a single file with a
# space in the name. Thus we query the IconList directly.
+ set selIcos [::tk::IconList_Curselection $data(icons)]
set data(selectFile) ""
- foreach item [::tk::IconList_Curselection $data(icons)] {
- ::tk::dialog::file::VerifyFileName $w \
+ if {[llength $selIcos] == 0 && $text ne ""} {
+ # This assumes the user typed something in without selecting
+ # files - so assume they only type in a single filename.
+ ::tk::dialog::file::VerifyFileName $w $text
+ } else {
+ foreach item $selIcos {
+ ::tk::dialog::file::VerifyFileName $w \
[::tk::IconList_Get $data(icons) $item]
+ }
}
} else {
::tk::dialog::file::VerifyFileName $w $text