diff options
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r-- | win/tkWinDialog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 9cab235..2e85cb6 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDialog.c,v 1.45 2007/08/01 09:02:54 patthoyts Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.46 2007/09/08 16:13:45 dkf Exp $ * */ @@ -2011,7 +2011,6 @@ Tk_MessageBoxObjCmd( int defaultBtn, icon, type; int i, oldMode, winCode; UINT flags; - Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding(); static CONST char *optionStrings[] = { "-default", "-detail", "-icon", "-message", "-parent", "-title", "-type", NULL @@ -2023,6 +2022,7 @@ Tk_MessageBoxObjCmd( ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + (void) TkWinGetUnicodeEncoding(); tkwin = (Tk_Window) clientData; defaultBtn = -1; @@ -2101,9 +2101,8 @@ Tk_MessageBoxObjCmd( flags = 0; if (defaultBtn >= 0) { - int defaultBtnIdx; + int defaultBtnIdx = -1; - defaultBtnIdx = -1; for (i = 0; i < NUM_TYPES; i++) { if (type == allowedTypes[i].type) { int j; @@ -2128,7 +2127,8 @@ Tk_MessageBoxObjCmd( flags |= icon | type | MB_SYSTEMMODAL; - tmpObj = messageObj ? Tcl_DuplicateObj(messageObj) : Tcl_NewUnicodeObj(NULL, 0); + tmpObj = messageObj ? Tcl_DuplicateObj(messageObj) + : Tcl_NewUnicodeObj(NULL, 0); Tcl_IncrRefCount(tmpObj); if (detailObj) { Tcl_AppendUnicodeToObj(tmpObj, L"\n\n", 2); |