diff options
author | tmh <tmh> | 2008-08-25 17:22:40 (GMT) |
---|---|---|
committer | tmh <tmh> | 2008-08-25 17:22:40 (GMT) |
commit | 94cf08034435ef86ef5cf29054b6c5566529b814 (patch) | |
tree | 0192f19aefc9430268a4a1e424c2094a003976a7 /library/tkfbox.tcl | |
parent | 8fc2e6cf6d08b3adda4490e068623bf679ec48d5 (diff) | |
download | tk-94cf08034435ef86ef5cf29054b6c5566529b814.zip tk-94cf08034435ef86ef5cf29054b6c5566529b814.tar.gz tk-94cf08034435ef86ef5cf29054b6c5566529b814.tar.bz2 |
fix for bug tracker id 1936220 backported from tk8.6
Diffstat (limited to 'library/tkfbox.tcl')
-rw-r--r-- | library/tkfbox.tcl | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index cb8cd41..8fb64b3 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.68.2.1 2008/08/25 17:22:40 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] |