summaryrefslogtreecommitdiffstats
path: root/generic/tkMenubutton.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
commit81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch)
treea17119411589e8c1291df53e2546243d84e78583 /generic/tkMenubutton.c
parent93d974c265533cf2445446954346be8192e850a0 (diff)
downloadtk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.zip
tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.gz
tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.bz2
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
Also fix a few newer (harmless) gcc warnings.
Diffstat (limited to 'generic/tkMenubutton.c')
-rw-r--r--generic/tkMenubutton.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 94ac8b2..a24ab98 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -251,7 +251,7 @@ Tk_MenubuttonObjCmd(
mbPtr->text = NULL;
mbPtr->underline = -1;
mbPtr->textVarName = NULL;
- mbPtr->bitmap = None;
+ mbPtr->bitmap = 0;
mbPtr->imageString = NULL;
mbPtr->image = NULL;
mbPtr->state = STATE_NORMAL;
@@ -267,11 +267,11 @@ Tk_MenubuttonObjCmd(
mbPtr->normalFg = NULL;
mbPtr->activeFg = NULL;
mbPtr->disabledFg = NULL;
- mbPtr->normalTextGC = None;
- mbPtr->activeTextGC = None;
- mbPtr->gray = None;
- mbPtr->disabledGC = None;
- mbPtr->stippleGC = None;
+ mbPtr->normalTextGC = 0;
+ mbPtr->activeTextGC = 0;
+ mbPtr->gray = 0;
+ mbPtr->disabledGC = 0;
+ mbPtr->stippleGC = 0;
mbPtr->leftBearing = 0;
mbPtr->rightBearing = 0;
mbPtr->widthString = NULL;
@@ -288,7 +288,7 @@ Tk_MenubuttonObjCmd(
mbPtr->indicatorWidth = 0;
mbPtr->indicatorHeight = 0;
mbPtr->direction = DIRECTION_FLUSH;
- mbPtr->cursor = None;
+ mbPtr->cursor = 0;
mbPtr->takeFocus = NULL;
mbPtr->flags = 0;
@@ -433,22 +433,22 @@ DestroyMenuButton(
if (mbPtr->image != NULL) {
Tk_FreeImage(mbPtr->image);
}
- if (mbPtr->normalTextGC != None) {
+ if (mbPtr->normalTextGC) {
Tk_FreeGC(mbPtr->display, mbPtr->normalTextGC);
}
- if (mbPtr->activeTextGC != None) {
+ if (mbPtr->activeTextGC) {
Tk_FreeGC(mbPtr->display, mbPtr->activeTextGC);
}
- if (mbPtr->disabledGC != None) {
+ if (mbPtr->disabledGC) {
Tk_FreeGC(mbPtr->display, mbPtr->disabledGC);
}
- if (mbPtr->stippleGC != None) {
+ if (mbPtr->stippleGC) {
Tk_FreeGC(mbPtr->display, mbPtr->stippleGC);
}
- if (mbPtr->gray != None) {
+ if (mbPtr->gray) {
Tk_FreeBitmap(mbPtr->display, mbPtr->gray);
}
- if (mbPtr->textLayout != NULL) {
+ if (mbPtr->textLayout) {
Tk_FreeTextLayout(mbPtr->textLayout);
}
Tk_FreeConfigOptions((char *) mbPtr, mbPtr->optionTable, mbPtr->tkwin);
@@ -578,7 +578,7 @@ ConfigureMenuButton(
* Recompute the geometry for the button.
*/
- if ((mbPtr->bitmap != None) || (mbPtr->image != NULL)) {
+ if (mbPtr->bitmap || mbPtr->image) {
if (Tk_GetPixels(interp, mbPtr->tkwin, mbPtr->widthString,
&mbPtr->width) != TCL_OK) {
widthError:
@@ -683,7 +683,7 @@ TkMenuButtonWorldChanged(
gcValues.graphics_exposures = False;
mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
gc = Tk_GetGC(mbPtr->tkwin, mask, &gcValues);
- if (mbPtr->normalTextGC != None) {
+ if (mbPtr->normalTextGC) {
Tk_FreeGC(mbPtr->display, mbPtr->normalTextGC);
}
mbPtr->normalTextGC = gc;
@@ -692,7 +692,7 @@ TkMenuButtonWorldChanged(
gcValues.background = Tk_3DBorderColor(mbPtr->activeBorder)->pixel;
mask = GCForeground | GCBackground | GCFont;
gc = Tk_GetGC(mbPtr->tkwin, mask, &gcValues);
- if (mbPtr->activeTextGC != None) {
+ if (mbPtr->activeTextGC) {
Tk_FreeGC(mbPtr->display, mbPtr->activeTextGC);
}
mbPtr->activeTextGC = gc;
@@ -703,13 +703,13 @@ TkMenuButtonWorldChanged(
* Create the GC that can be used for stippling
*/
- if (mbPtr->stippleGC == None) {
+ if (!mbPtr->stippleGC) {
gcValues.foreground = gcValues.background;
mask = GCForeground;
- if (mbPtr->gray == None) {
+ if (!mbPtr->gray) {
mbPtr->gray = Tk_GetBitmap(NULL, mbPtr->tkwin, "gray50");
}
- if (mbPtr->gray != None) {
+ if (mbPtr->gray) {
gcValues.fill_style = FillStippled;
gcValues.stipple = mbPtr->gray;
mask |= GCFillStyle | GCStipple;
@@ -723,13 +723,13 @@ TkMenuButtonWorldChanged(
*/
mask = GCForeground | GCBackground | GCFont;
- if (mbPtr->disabledFg != NULL) {
+ if (mbPtr->disabledFg) {
gcValues.foreground = mbPtr->disabledFg->pixel;
} else {
gcValues.foreground = gcValues.background;
}
gc = Tk_GetGC(mbPtr->tkwin, mask, &gcValues);
- if (mbPtr->disabledGC != None) {
+ if (mbPtr->disabledGC) {
Tk_FreeGC(mbPtr->display, mbPtr->disabledGC);
}
mbPtr->disabledGC = gc;