diff options
Diffstat (limited to 'library/comdlg.tcl')
-rw-r--r-- | library/comdlg.tcl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/library/comdlg.tcl b/library/comdlg.tcl index 6ded323..39d27d3 100644 --- a/library/comdlg.tcl +++ b/library/comdlg.tcl @@ -182,7 +182,7 @@ proc ::tk::FocusGroup_Destroy {t w} { unset FocusOut($name) } } else { - if {[info exists Priv(focus,$t)] && $Priv(focus,$t) eq $w} { + if {[info exists Priv(focus,$t)] && ($Priv(focus,$t) eq $w)} { set Priv(focus,$t) "" } unset -nocomplain FocusIn($t,$w) FocusOut($t,$w) @@ -257,7 +257,7 @@ proc ::tk::FDGetFileTypes {string} { if {[llength $t] < 2 || [llength $t] > 3} { error "bad file type \"$t\", should be \"typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?\"" } - eval lappend [list fileTypes([lindex $t 0])] [lindex $t 1] + lappend fileTypes([lindex $t 0]) {*}[lindex $t 1] } set types {} @@ -269,6 +269,15 @@ proc ::tk::FDGetFileTypes {string} { continue } + # Validate each macType. This is to agree with the + # behaviour of TkGetFileFilters(). This list may be + # empty. + foreach macType [lindex $t 2] { + if {[string length $macType] != 4} { + error "bad Macintosh file type \"$macType\"" + } + } + set name "$label \(" set sep "" set doAppend 1 |