summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authortmh <tmh>2008-08-25 17:13:03 (GMT)
committertmh <tmh>2008-08-25 17:13:03 (GMT)
commit722b9e5353b33fdcd23e186a5855e5488e571278 (patch)
tree0d04486a051539685f2a55f91368482f3389bef8 /library
parentbd79f8a41674406a540bf14e81358a61317902ed (diff)
downloadtk-722b9e5353b33fdcd23e186a5855e5488e571278.zip
tk-722b9e5353b33fdcd23e186a5855e5488e571278.tar.gz
tk-722b9e5353b33fdcd23e186a5855e5488e571278.tar.bz2
Bug tracker ID 1936220
This patch corrects the multiple selection error reported in this bug tracker.
Diffstat (limited to 'library')
-rw-r--r--library/tkfbox.tcl27
1 files changed, 7 insertions, 20 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index cb8cd41..3f8dc9f 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.68 2007/12/13 15:26:27 dgp Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.69 2008/08/25 17:13:04 tmh Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -581,12 +581,11 @@ proc ::tk::IconList_ShiftBtn1 {w x y} {
if {$i eq ""} {
return
}
- set a [IconList_Index $w anchor]
- if {$a eq ""} {
- set a $i
+ if {[IconList_Index $w anchor] eq ""} {
+ IconList_Selection $w anchor $i
}
IconList_Selection $w clear 0 end
- IconList_Selection $w set $a $i
+ IconList_Selection $w set anchor $i
}
}
@@ -1608,20 +1607,8 @@ proc ::tk::dialog::file::ActivateEnt {w} {
set text [$data(ent) get]
if {$data(-multiple)} {
- # For the multiple case we have to be careful to get the file
- # 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) ""
- 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.
- VerifyFileName $w $text
- } else {
- foreach item $selIcos {
- VerifyFileName $w [::tk::IconList_Get $data(icons) $item]
- }
+ foreach t $text {
+ VerifyFileName $w $t
}
} else {
VerifyFileName $w $text
@@ -1783,7 +1770,7 @@ proc ::tk::dialog::file::ListBrowse {w} {
if {[llength $text] == 0} {
return
}
- if { [llength $text] > 1 } {
+ if {$data(-multiple)} {
set newtext {}
foreach file $text {
set fullfile [JoinFile $data(selectPath) $file]