summaryrefslogtreecommitdiffstats
path: root/library/xmfbox.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-10-16 23:39:32 (GMT)
committerhobbs <hobbs>2001-10-16 23:39:32 (GMT)
commit0f8507d5a6f732f53c05d724b4658b05a3a322c6 (patch)
tree72423a4c49d5ff4ace73469c682d11fbffb32dee /library/xmfbox.tcl
parent4466b21bccaf576efd87ae1952005a07a6685c80 (diff)
downloadtk-0f8507d5a6f732f53c05d724b4658b05a3a322c6.zip
tk-0f8507d5a6f732f53c05d724b4658b05a3a322c6.tar.gz
tk-0f8507d5a6f732f53c05d724b4658b05a3a322c6.tar.bz2
* library/xmfbox.tcl: fixed filtering in motif file dialog.
[Patch #469670] (nelson)
Diffstat (limited to 'library/xmfbox.tcl')
-rw-r--r--library/xmfbox.tcl14
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