summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-04-10 21:33:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-04-10 21:33:44 (GMT)
commit5b591cde8c1f5dab94c620646416e88e2d04a6dd (patch)
tree1fa5db8dd07305494ca6a7b46ade459431dc66ab
parent272fe823fe3b1e0e048c8b7363b3992a909cbdc3 (diff)
downloadtk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.zip
tk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.tar.gz
tk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.tar.bz2
Fix [1467938]
-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
}