From 7fd2d51229f0e0f817966bb438485c2a2067b52a Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 13 Dec 2007 23:08:43 +0000 Subject: * generic/tkMenubutton.c (ConfigureMenuButton): trace the -textvariable even if an image exists as it may use -compound. --- ChangeLog | 7 ++++++- changes | 5 ++++- generic/tkMenubutton.c | 13 +++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d717c98..2dc2eba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ -2007-12-12 Jeff Hobbs +2007-12-13 Jeff Hobbs *** 8.5.0 TAGGED FOR RELEASE *** + * generic/tkMenubutton.c (ConfigureMenuButton): trace the + -textvariable even if an image exists as it may use -compound. + +2007-12-12 Jeff Hobbs + * generic/tkText.c (DeleteIndexRange, TextEditCmd, UpdateDirtyFlag): * tests/text.test (text-25.10.1,25.11.[12]): Don't require [update idle] to trigger Modified event [Bug 1809538] diff --git a/changes b/changes index 2b07a9f..c5d3a7c 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.119 2007/12/13 15:23:42 dgp Exp $ +RCS: @(#) $Id: changes,v 1.120 2007/12/13 23:08:43 hobbs Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -6456,6 +6456,9 @@ steffen, kupries) 2007-12-12 (bug fix)[1845899] Aqua: [wm transient] (steffen) +2007-12-13 (bug fix) correctly trace menubutton -textvariable for -compound +use (hobbs) + Several documentation and release notes improvements --- Released 8.5.0, December 14, 2007 --- See ChangeLog for details --- diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index a5b1cc4..7d3622a 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.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: tkMenubutton.c,v 1.18 2007/12/13 15:24:16 dgp Exp $ + * RCS: @(#) $Id: tkMenubutton.c,v 1.19 2007/12/13 23:08:43 hobbs Exp $ */ #include "tkInt.h" @@ -610,15 +610,12 @@ ConfigureMenuButton( Tk_FreeSavedOptions(&savedOptions); } - if ((mbPtr->image == NULL) && (mbPtr->bitmap == None) - && (mbPtr->textVarName != NULL)) { - + if (mbPtr->textVarName != NULL) { /* - * The menubutton displays the value of a variable. Set up a trace to - * watch for any changes in it, create the variable if it doesn't - * exist, and fetch its current value. + * If no image or -compound is used, display the value of a variable. + * Set up a trace to watch for any changes in it, create the variable + * if it doesn't exist, and fetch its current value. */ - CONST char *value; value = Tcl_GetVar(interp, mbPtr->textVarName, TCL_GLOBAL_ONLY); -- cgit v0.12