summaryrefslogtreecommitdiffstats
path: root/win/tkWinDialog.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-09-08 16:13:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-09-08 16:13:45 (GMT)
commit94bc46d46cbcb986f2da2451a7e557fb6cfd017b (patch)
tree5f23acee730c544b491aba77d49ce84b33d02279 /win/tkWinDialog.c
parentdcf3897c755ed042d4b1b5b8481d5c83c2a928b4 (diff)
downloadtk-94bc46d46cbcb986f2da2451a7e557fb6cfd017b.zip
tk-94bc46d46cbcb986f2da2451a7e557fb6cfd017b.tar.gz
tk-94bc46d46cbcb986f2da2451a7e557fb6cfd017b.tar.bz2
Assorted minor cleanups.
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r--win/tkWinDialog.c10
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);