summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2005-11-10 11:38:29 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2005-11-10 11:38:29 (GMT)
commit2032c7fd40326e4191d8116e4d8e62a135aa3285 (patch)
tree517a8bbdaa7cc28359b34c040456cec897ee44cd /win/tkWinMenu.c
parentf02cba1b926bde375f78728c8fa4348f31410a22 (diff)
downloadtk-2032c7fd40326e4191d8116e4d8e62a135aa3285.zip
tk-2032c7fd40326e4191d8116e4d8e62a135aa3285.tar.gz
tk-2032c7fd40326e4191d8116e4d8e62a135aa3285.tar.bz2
Fixes of other issues raised in [Bug 1353022]
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c12
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);
}
/*