diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinMenu.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 0234f5a..fd3592b 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.45 2005/08/10 22:02:22 dkf Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.46 2005/11/10 11:38:29 dkf Exp $ */ #define OEMRESOURCE @@ -3017,7 +3017,6 @@ SetDefaults( char sizeString[TCL_INTEGER_SPACE]; char faceName[LF_FACESIZE]; HDC scratchDC; - Tcl_DString boldItalicDString; int bold = 0; int italic = 0; TEXTMETRIC tm; @@ -3066,16 +3065,19 @@ SetDefaults( sprintf(sizeString, "%d", pointSize); Tcl_DStringAppendElement(&menuFontDString, sizeString); - if (bold == 1 || italic == 1) { + if (bold || italic) { + Tcl_DString boldItalicDString; + Tcl_DStringInit(&boldItalicDString); - if (bold == 1) { + if (bold) { Tcl_DStringAppendElement(&boldItalicDString, "bold"); } - if (italic == 1) { + if (italic) { Tcl_DStringAppendElement(&boldItalicDString, "italic"); } Tcl_DStringAppendElement(&menuFontDString, Tcl_DStringValue(&boldItalicDString)); + Tcl_DStringFree(&boldItalicDString); } /* |