diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXButton.c | 14 | ||||
-rw-r--r-- | tests/text.test | 10 |
3 files changed, 27 insertions, 5 deletions
@@ -1,3 +1,11 @@ +2004-11-09 Vince Darley <vincentdarley@users.sourceforge.net> + + * macosx/tkMacOSXButton.c: fix to dynamic reconfiguration of + button '-compound' options (cosmetic problem), [Bug 1055023] + + * tests/text.test: added 'knownBug' 20.172.1 in text widget + multiline search routines. + 2004-11-08 Donal K. Fellows <donal.k.fellows@man.ac.uk> * library/demos/goldberg.tcl: Added slightly adapted version of diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 320ffe6..0bdb767 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.9 2004/02/18 00:40:24 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.10 2004/11/09 12:46:10 vincentdarley Exp $ */ #include "tkButton.h" @@ -976,9 +976,15 @@ TkMacOSXDrawControl( Tk_Font font; int len; - len = TkFontGetFirstTextLayout(butPtr->textLayout, - &font, controlTitle); - controlTitle[len] = 0; + if ((mbPtr->info.image == NULL) && (mbPtr->info.bitmap == None) + || (mbPtr->info.compound != COMPOUND_NONE)) { + len = TkFontGetFirstTextLayout(butPtr->textLayout, + &font, controlTitle); + controlTitle[len] = 0; + } else { + len = 0; + controlTitle[0] = 0; + } if (bcmp(mbPtr->controlTitle, controlTitle, len+1)) { CFStringRef cf; cf = CFStringCreateWithCString(NULL, diff --git a/tests/text.test b/tests/text.test index aeebf6f..70cbaa2 100644 --- a/tests/text.test +++ b/tests/text.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: text.test,v 1.33 2004/09/23 14:57:25 vincentdarley Exp $ +# RCS: @(#) $Id: text.test,v 1.34 2004/11/09 12:46:10 vincentdarley Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -2648,6 +2648,14 @@ test text-20.172 {TextSearchCmd, regexp search multi-line} {knownBug} { # Should match at 1.0 for a true greedy match } {1.0} +test text-20.172.1 {TextSearchCmd, regexp search multi-line} {knownBug} { + deleteWindows + pack [text .t2] + .t2 insert 1.0 "line0\nline1\nline1\nline1\nline1\nline2\nline2\nline2\nline3\n" + .t2 search -nolinestop -regexp -nocase -forwards -- {^(.*)\n(\1\n)+} 1.0 end + # Matches at 6.0 currently +} {2.0} + test text-20.173 {TextSearchCmd, regexp search multi-line} { deleteWindows pack [text .t2] |