diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-08 08:31:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-08 08:31:34 (GMT) |
commit | 1cf82956754b0b42ef212635195b5c29fc93a0fc (patch) | |
tree | b6bf6eaff55be5c6fd20363aea6473c6bfbd76ad /generic/tkButton.c | |
parent | 726546cf2742672ce6de89b0500b3e750c6fe3b7 (diff) | |
parent | d2747a371058fa4128dbd7896fe040f0b3ee6be7 (diff) | |
download | tk-1cf82956754b0b42ef212635195b5c29fc93a0fc.zip tk-1cf82956754b0b42ef212635195b5c29fc93a0fc.tar.gz tk-1cf82956754b0b42ef212635195b5c29fc93a0fc.tar.bz2 |
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
*** POTENTIAL INCOMPATIBILITY *** on Windows only: gcc/clang/MSVC will generate new warnings in extensions when the "None" symbol is used incorrectly.
Those warnings are all fixed in the core, that's what most of this commit is doing.
Diffstat (limited to 'generic/tkButton.c')
-rw-r--r-- | generic/tkButton.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index 70bba83..0de949c 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -710,12 +710,12 @@ ButtonCreate( butPtr->normalFg = NULL; butPtr->activeFg = NULL; butPtr->disabledFg = NULL; - butPtr->normalTextGC = None; - butPtr->activeTextGC = None; - butPtr->disabledGC = None; - butPtr->stippleGC = None; + butPtr->normalTextGC = NULL; + butPtr->activeTextGC = NULL; + butPtr->disabledGC = NULL; + butPtr->stippleGC = NULL; butPtr->gray = None; - butPtr->copyGC = None; + butPtr->copyGC = NULL; butPtr->widthPtr = NULL; butPtr->width = 0; butPtr->heightPtr = NULL; @@ -740,7 +740,7 @@ ButtonCreate( butPtr->onValuePtr = NULL; butPtr->offValuePtr = NULL; butPtr->tristateValuePtr = NULL; - butPtr->cursor = None; + butPtr->cursor = NULL; butPtr->takeFocusPtr = NULL; butPtr->commandPtr = NULL; butPtr->flags = 0; @@ -978,22 +978,22 @@ DestroyButton( if (butPtr->tristateImage != NULL) { Tk_FreeImage(butPtr->tristateImage); } - if (butPtr->normalTextGC != None) { + if (butPtr->normalTextGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->normalTextGC); } - if (butPtr->activeTextGC != None) { + if (butPtr->activeTextGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->activeTextGC); } - if (butPtr->disabledGC != None) { + if (butPtr->disabledGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->disabledGC); } - if (butPtr->stippleGC != None) { + if (butPtr->stippleGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->stippleGC); } if (butPtr->gray != None) { Tk_FreeBitmap(butPtr->display, butPtr->gray); } - if (butPtr->copyGC != None) { + if (butPtr->copyGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->copyGC); } if (butPtr->textLayout != NULL) { @@ -1366,7 +1366,7 @@ TkButtonWorldChanged( gcValues.graphics_exposures = False; mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures; newGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues); - if (butPtr->normalTextGC != None) { + if (butPtr->normalTextGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->normalTextGC); } butPtr->normalTextGC = newGC; @@ -1376,7 +1376,7 @@ TkButtonWorldChanged( gcValues.background = Tk_3DBorderColor(butPtr->activeBorder)->pixel; mask = GCForeground | GCBackground | GCFont; newGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues); - if (butPtr->activeTextGC != None) { + if (butPtr->activeTextGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->activeTextGC); } butPtr->activeTextGC = newGC; @@ -1388,7 +1388,7 @@ TkButtonWorldChanged( * Create the GC that can be used for stippling */ - if (butPtr->stippleGC == None) { + if (butPtr->stippleGC == NULL) { gcValues.foreground = gcValues.background; mask = GCForeground; if (butPtr->gray == None) { @@ -1414,12 +1414,12 @@ TkButtonWorldChanged( gcValues.foreground = gcValues.background; } newGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues); - if (butPtr->disabledGC != None) { + if (butPtr->disabledGC != NULL) { Tk_FreeGC(butPtr->display, butPtr->disabledGC); } butPtr->disabledGC = newGC; - if (butPtr->copyGC == None) { + if (butPtr->copyGC == NULL) { butPtr->copyGC = Tk_GetGC(butPtr->tkwin, 0, &gcValues); } |