summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-12-13 23:08:43 (GMT)
committerhobbs <hobbs>2007-12-13 23:08:43 (GMT)
commit7fd2d51229f0e0f817966bb438485c2a2067b52a (patch)
treea9654701576252987e87bb1eb639c5cb16714bc8 /generic
parentad22aa264a6389aad9cd820032d1f8cca5832914 (diff)
downloadtk-7fd2d51229f0e0f817966bb438485c2a2067b52a.zip
tk-7fd2d51229f0e0f817966bb438485c2a2067b52a.tar.gz
tk-7fd2d51229f0e0f817966bb438485c2a2067b52a.tar.bz2
* generic/tkMenubutton.c (ConfigureMenuButton): trace the
-textvariable even if an image exists as it may use -compound.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkMenubutton.c13
1 files changed, 5 insertions, 8 deletions
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);