diff options
author | stanton <stanton> | 1998-11-20 02:35:12 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-11-20 02:35:12 (GMT) |
commit | 7afcd00b6226165aaad4d25955b6bc4d21063bfd (patch) | |
tree | 823ae966e1942d388b47ba38cde202654b110996 /win | |
parent | 03b4b91c1628f9a273443adb656e878555a5e3f1 (diff) | |
download | tk-7afcd00b6226165aaad4d25955b6bc4d21063bfd.zip tk-7afcd00b6226165aaad4d25955b6bc4d21063bfd.tar.gz tk-7afcd00b6226165aaad4d25955b6bc4d21063bfd.tar.bz2 |
* tkWinWm.c, tkWinMenu.c: fixed titles and menus so they properly
display Unicode [Bug: 819]
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 15 | ||||
-rw-r--r-- | win/tkWinX.c | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index ea7d07a..92ce55e 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.1.4.3 1998/11/10 19:04:51 stanton Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.1.4.4 1998/11/20 02:35:12 stanton Exp $ */ #include "tkWinInt.h" @@ -643,6 +643,7 @@ UpdateWrapper(winPtr) HWND child = TkWinGetHWND(winPtr->window); int x, y, width, height, state; WINDOWPLACEMENT place; + Tcl_DString titleString; parentHWND = NULL; child = TkWinGetHWND(winPtr->window); @@ -715,10 +716,12 @@ UpdateWrapper(winPtr) */ createWindow = winPtr; + Tcl_UtfToExternalDString(NULL, wmPtr->titleUid, -1, &titleString); wmPtr->wrapper = CreateWindowEx(wmPtr->exStyle, TK_WIN_TOPLEVEL_CLASS_NAME, - wmPtr->titleUid, wmPtr->style, x, y, width, height, - parentHWND, NULL, Tk_GetHINSTANCE(), NULL); + Tcl_DStringValue(&titleString), wmPtr->style, x, y, width, + height, parentHWND, NULL, Tk_GetHINSTANCE(), NULL); + Tcl_DStringFree(&titleString); SetWindowLong(wmPtr->wrapper, GWL_USERDATA, (LONG) winPtr); createWindow = NULL; @@ -2037,7 +2040,11 @@ Tk_WmCmd(clientData, interp, argc, argv) } else { wmPtr->titleUid = Tk_GetUid(argv[3]); if (!(wmPtr->flags & WM_NEVER_MAPPED) && wmPtr->wrapper != NULL) { - SetWindowText(wmPtr->wrapper, wmPtr->titleUid); + Tcl_DString titleString; + Tcl_UtfToExternalDString(NULL, wmPtr->titleUid, -1, + &titleString); + SetWindowText(wmPtr->wrapper, Tcl_DStringValue(&titleString)); + Tcl_DStringFree(&titleString); } } } else if ((c == 't') && (strncmp(argv[1], "transient", length) == 0) diff --git a/win/tkWinX.c b/win/tkWinX.c index 9ec1865..a47b78a 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinX.c,v 1.1.4.3 1998/10/06 03:27:37 stanton Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.1.4.4 1998/11/20 02:35:15 stanton Exp $ */ #include "tkWinInt.h" @@ -941,8 +941,6 @@ GetTranslatedKey(xkey) while ((xkey->nbytes < XMaxTransChars) && PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { if ((msg.message == WM_CHAR) || (msg.message == WM_SYSCHAR)) { - xkey->trans_chars[xkey->nbytes] = (char) msg.wParam; - xkey->nbytes++; GetMessage(&msg, NULL, 0, 0); /* |