diff options
author | dgp <dgp@users.sourceforge.net> | 2005-04-05 13:56:31 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-04-05 13:56:31 (GMT) |
commit | 19b266b312edc253fa16d04f6fab6c7a6e2c0494 (patch) | |
tree | 0904533dc028a35ca18d7dfe07f484cef44aea8f | |
parent | b5f1ab1fb4a53001ab61083d12a3597ffe7cc72e (diff) | |
download | tk-19b266b312edc253fa16d04f6fab6c7a6e2c0494.zip tk-19b266b312edc253fa16d04f6fab6c7a6e2c0494.tar.gz tk-19b266b312edc253fa16d04f6fab6c7a6e2c0494.tar.bz2 |
* library/comdlg.tcl: Added Macintosh file type validation to
[::tk::FDGetFileTypes]. [Bug 1083878] (Thanks, Vince Darley)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | library/comdlg.tcl | 11 |
2 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-04-04 Don Porter <dgp@users.sourceforge.net> + + * library/comdlg.tcl: Added Macintosh file type validation to + [::tk::FDGetFileTypes]. [Bug 1083878] (Thanks, Vince Darley) + 2005-04-04 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c: diff --git a/library/comdlg.tcl b/library/comdlg.tcl index 9cc5d74..5192791 100644 --- a/library/comdlg.tcl +++ b/library/comdlg.tcl @@ -3,7 +3,7 @@ # Some functions needed for the common dialog boxes. Probably need to go # in a different file. # -# RCS: @(#) $Id: comdlg.tcl,v 1.9 2003/02/21 13:32:14 dkf Exp $ +# RCS: @(#) $Id: comdlg.tcl,v 1.10 2005/04/05 13:56:35 dgp Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -279,6 +279,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 |