diff options
author | hobbs <hobbs> | 2001-10-16 23:39:32 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-10-16 23:39:32 (GMT) |
commit | 414c25f923e8ebe7404e12157d17c237e57e3215 (patch) | |
tree | 72423a4c49d5ff4ace73469c682d11fbffb32dee /library | |
parent | 9b0985013c683cac996d0d0bdf5894f9b760c5ff (diff) | |
download | tk-414c25f923e8ebe7404e12157d17c237e57e3215.zip tk-414c25f923e8ebe7404e12157d17c237e57e3215.tar.gz tk-414c25f923e8ebe7404e12157d17c237e57e3215.tar.bz2 |
* library/xmfbox.tcl: fixed filtering in motif file dialog.
[Patch #469670] (nelson)
Diffstat (limited to 'library')
-rw-r--r-- | library/xmfbox.tcl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 545c962..58f5496 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -4,7 +4,7 @@ # Unix platform. This implementation is used only if the # "::tk_strictMotif" flag is set. # -# RCS: @(#) $Id: xmfbox.tcl,v 1.17 2001/08/01 16:21:11 dgp Exp $ +# RCS: @(#) $Id: xmfbox.tcl,v 1.18 2001/10/16 23:39:32 hobbs Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Scriptics Corporation @@ -518,7 +518,8 @@ proc ::tk::MotifFDialog_Update {w} { upvar ::tk::dialog::file::[winfo name $w] data $data(fEnt) delete 0 end - $data(fEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) $data(filter)] + $data(fEnt) insert 0 \ + [::tk::dialog::file::JoinFile $data(selectPath) $data(filter)] $data(sEnt) delete 0 end $data(sEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) \ $data(selectFile)] @@ -566,16 +567,19 @@ proc ::tk::MotifFDialog_LoadFiles {w} { if {[file isdir ./$f]} { lappend dlist $f } else { - if {[string match $data(filter) $f]} { + foreach pat $data(filter) { + if {[string match $pat $f]} { if {[string match .* $f]} { incr top } lappend flist $f + break } + } } } - eval $data(dList) insert end [lsort -dictionary $dlist] - eval $data(fList) insert end [lsort -dictionary $flist] + eval [list $data(dList) insert end] [lsort -dictionary $dlist] + eval [list $data(fList) insert end] [lsort -dictionary $flist] # The user probably doesn't want to see the . files. We adjust the view # so that the listbox displays all the non-dot files |