diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | library/choosedir.tcl | 7 | ||||
-rw-r--r-- | library/tkfbox.tcl | 25 |
3 files changed, 25 insertions, 16 deletions
@@ -1,3 +1,10 @@ +2001-09-17 Donal K. Fellows <fellowsd@cs.man.ac.uk> + + * library/choosedir.tcl (DblClick): + * library/tkfbox.tcl (OkCmd, ListInvoke): Rewrote so as to avoid + the highly confusing string "text" and to be consistent about what + is and what is not a list. [Bug 459895, reported by fandom] + 2001-09-14 Andreas Kupries <andreas_kupries@users.sourceforge.net> * generic/tkImgGIF.c: @@ -15,7 +22,7 @@ 2001-09-12 D. Richard Hipp <drh@hwaci.com> - * Fix a bug in library/tkxbox.tcl + * Fix a bug in library/tkfbox.tcl 2001-09-10 Mo DeJong <mdejong@users.sourceforge.net> diff --git a/library/choosedir.tcl b/library/choosedir.tcl index ee4dfb1..8f1df99 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -5,7 +5,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: choosedir.tcl,v 1.10 2001/08/01 16:21:11 dgp Exp $ +# RCS: @(#) $Id: choosedir.tcl,v 1.11 2001/09/17 14:12:18 dkf Exp $ # Make sure the tk::dialog namespace, in which all dialogs should live, exists namespace eval ::tk::dialog {} @@ -222,10 +222,11 @@ proc ::tk::dialog::file::chooseDir::DblClick {w} { upvar ::tk::dialog::file::[winfo name $w] data set selection [tk::IconList_Curselection $data(icons)] if { [llength $selection] != 0 } { - set text [tk::IconList_Get $data(icons) [lindex $selection 0]] + set filenameFragment \ + [tk::IconList_Get $data(icons) [lindex $selection 0]] set file $data(selectPath) if {[file isdirectory $file]} { - ::tk::dialog::file::ListInvoke $w $text + ::tk::dialog::file::ListInvoke $w [list $filenameFragment] return } } diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index be10d49..7fce44e 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.30 2001/09/12 19:13:56 drh Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.31 2001/09/17 14:12:18 dkf Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -1626,17 +1626,17 @@ proc ::tk::dialog::file::JoinFile {path file} { proc ::tk::dialog::file::OkCmd {w} { upvar ::tk::dialog::file::[winfo name $w] data - set text {} + set filenames {} foreach item [::tk::IconList_Curselection $data(icons)] { - lappend text [::tk::IconList_Get $data(icons) $item] + lappend filenames [::tk::IconList_Get $data(icons) $item] } - if {([llength $text] && !$data(-multiple)) || \ - ($data(-multiple) && ([llength $text] == 1))} { - set text [lindex $text 0] - set file [::tk::dialog::file::JoinFile $data(selectPath) $text] + if {([llength $filenames] && !$data(-multiple)) || \ + ($data(-multiple) && ([llength $filenames] == 1))} { + set filename [lindex $filenames 0] + set file [::tk::dialog::file::JoinFile $data(selectPath) $filename] if {[file isdirectory $file]} { - ::tk::dialog::file::ListInvoke $w [list $text] + ::tk::dialog::file::ListInvoke $w [list $filename] return } } @@ -1702,14 +1702,15 @@ proc ::tk::dialog::file::ListBrowse {w} { # Gets called when user invokes the IconList widget (double-click, # Return key, etc) # -proc ::tk::dialog::file::ListInvoke {w text} { +proc ::tk::dialog::file::ListInvoke {w filenames} { upvar ::tk::dialog::file::[winfo name $w] data - if {[llength $text] == 0} { + if {[llength $filenames] == 0} { return } - set file [::tk::dialog::file::JoinFile $data(selectPath) [lindex $text 0]] + set file [::tk::dialog::file::JoinFile $data(selectPath) \ + [lindex $filenames 0]] set class [winfo class $w] if {[string equal $class TkChooseDir] || [file isdirectory $file]} { @@ -1724,7 +1725,7 @@ proc ::tk::dialog::file::ListInvoke {w text} { } } else { if {$data(-multiple)} { - set data(selectFile) $text + set data(selectFile) $filenames } else { set data(selectFile) $file } |