summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--library/tkfbox.tcl16
2 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index ec2e54e..ffb038e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,14 @@
+2006-04-10 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
+
+ * library/tkfbox.tcl (::tk::IconList_Goto): Fix prefix searching so
+ that the start location is reasonable, and the prefix matching is
+ using the correct Tcl command for this. [Bug 1467938]
+
2006-04-10 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
* macosx/tkMacOSXFont.c (MeasureStringWidth): Use implementation
based on ATSUGetGlyphBounds (TK_MAC_USE_GETGLYPHBOUNDS), so we can
- use kATSUseFractionalOrigins. This in turn corrects bug #1461650.
+ use kATSUseFractionalOrigins. This in turn corrects [Bug 1461650].
* (InitFont): Use "." and "W" instead of "i" and "w" to determine the
"-fixed" attribute. This prevents "Apple Chancery" from being
classified as fixed.
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 73efa58..07e214b 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.56 2006/03/17 11:13:15 patthoyts Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.57 2006/04/10 21:33:45 dkf Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -737,18 +737,22 @@ proc ::tk::IconList_Goto {w text} {
return
}
- set text [string tolower $text]
+ if {[llength [IconList_CurSelection $w]]} {
+ set start [IconList_Index $w anchor]
+ } else {
+ set start 0
+ }
+
set theIndex -1
set less 0
set len [string length $text]
set len0 [expr {$len-1}]
set i $start
- # Search forward until we find a filename whose prefix is an exact match
- # with $text
+ # Search forward until we find a filename whose prefix is a
+ # case-insensitive match with $text
while {1} {
- set sub [string range $textList($i) 0 $len0]
- if {$text eq $sub} {
+ if {[string equal -nocase -length $len0 $textList($i) $text]} {
set theIndex $i
break
}