summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmh <tmh>2008-08-25 17:13:03 (GMT)
committertmh <tmh>2008-08-25 17:13:03 (GMT)
commit8fbda35ae78927b188accd5c8ad60121c28515ca (patch)
tree0d04486a051539685f2a55f91368482f3389bef8
parentc15d4f0c4b547bf3af0d4e9870964fb6608f0c39 (diff)
downloadtk-8fbda35ae78927b188accd5c8ad60121c28515ca.zip
tk-8fbda35ae78927b188accd5c8ad60121c28515ca.tar.gz
tk-8fbda35ae78927b188accd5c8ad60121c28515ca.tar.bz2
Bug tracker ID 1936220
This patch corrects the multiple selection error reported in this bug tracker.
-rw-r--r--ChangeLog7
-rw-r--r--library/tkfbox.tcl27
2 files changed, 14 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 490b0b1..dbcff39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-25 Todd M. Helfter <tmh@users.sourceforge.net>
+
+ The patch is associated with the bug tracker id: 1936220
+ library/tkfbox.tcl : fix the multiple selection error for
+ tk_getOpenFile -multiple 1 which fails on all unix platforms since
+ the adoption of ttk widgets.
+
2008-08-25 Donal K. Fellows <dkf@users.sf.net>
* generic/tkImgPhoto.c: Split the implementation of the core of
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]