diff options
Diffstat (limited to 'generic/tkMessage.c')
-rw-r--r-- | generic/tkMessage.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 24a55e9..e44da06 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -256,11 +256,11 @@ Tk_MessageObjCmd( MessageCmdDeletedProc); msgPtr->optionTable = optionTable; msgPtr->relief = TK_RELIEF_FLAT; - msgPtr->textGC = 0; + msgPtr->textGC = NULL; msgPtr->anchor = TK_ANCHOR_CENTER; msgPtr->aspect = 150; msgPtr->justify = TK_JUSTIFY_LEFT; - msgPtr->cursor = 0; + msgPtr->cursor = NULL; Tk_SetClass(msgPtr->tkwin, "Message"); Tk_SetClassProcs(msgPtr->tkwin, &messageClass, msgPtr); @@ -398,13 +398,13 @@ DestroyMessage( * Tk_FreeConfigOptions handle all the standard option-related stuff. */ - if (msgPtr->textGC) { + if (msgPtr->textGC != None) { Tk_FreeGC(msgPtr->display, msgPtr->textGC); } - if (msgPtr->textLayout) { + if (msgPtr->textLayout != NULL) { Tk_FreeTextLayout(msgPtr->textLayout); } - if (msgPtr->textVarName) { + if (msgPtr->textVarName != NULL) { Tcl_UntraceVar2(msgPtr->interp, msgPtr->textVarName, NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); @@ -471,7 +471,7 @@ ConfigureMessage( const char *value; value = Tcl_GetVar2(interp, msgPtr->textVarName, NULL, TCL_GLOBAL_ONLY); - if (!value) { + if (value == NULL) { Tcl_SetVar2(interp, msgPtr->textVarName, NULL, msgPtr->string, TCL_GLOBAL_ONLY); } else { @@ -525,18 +525,18 @@ MessageWorldChanged( ClientData instanceData) /* Information about widget. */ { XGCValues gcValues; - GC gc = 0; + GC gc = NULL; Tk_FontMetrics fm; Message *msgPtr = instanceData; - if (msgPtr->border) { + if (msgPtr->border != NULL) { Tk_SetBackgroundFromBorder(msgPtr->tkwin, msgPtr->border); } gcValues.font = Tk_FontId(msgPtr->tkfont); gcValues.foreground = msgPtr->fgColorPtr->pixel; gc = Tk_GetGC(msgPtr->tkwin, GCForeground | GCFont, &gcValues); - if (msgPtr->textGC) { + if (msgPtr->textGC != None) { Tk_FreeGC(msgPtr->display, msgPtr->textGC); } msgPtr->textGC = gc; |