diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-11-10 11:38:29 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-11-10 11:38:29 (GMT) |
commit | edc304c9592d5d5d530ad08c033006e7ce1c38f1 (patch) | |
tree | 517a8bbdaa7cc28359b34c040456cec897ee44cd /win/tkWinMenu.c | |
parent | 1acbd7884a685ddd69efcf085700c36f2192bc95 (diff) | |
download | tk-edc304c9592d5d5d530ad08c033006e7ce1c38f1.zip tk-edc304c9592d5d5d530ad08c033006e7ce1c38f1.tar.gz tk-edc304c9592d5d5d530ad08c033006e7ce1c38f1.tar.bz2 |
Fixes of other issues raised in [Bug 1353022]
Diffstat (limited to 'win/tkWinMenu.c')
-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); } /* |