diff options
author | hobbs <hobbs> | 2004-05-03 22:40:30 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-05-03 22:40:30 (GMT) |
commit | e7513a24faa053ccefd16199f1faa3e459c9eb16 (patch) | |
tree | 0991e2d295fa96e9ed3e196167233c1475098e3e | |
parent | bec318682f65b645a8915ca70da8b87e9fdf2b86 (diff) | |
download | tk-e7513a24faa053ccefd16199f1faa3e459c9eb16.zip tk-e7513a24faa053ccefd16199f1faa3e459c9eb16.tar.gz tk-e7513a24faa053ccefd16199f1faa3e459c9eb16.tar.bz2 |
* win/tkWinX.c: fix drawing of unicode chars in menu
* win/tkWinInt.h (TkWinProcs): titles. [Bug #904371] (riefenstahl)
* win/tkWinMenu.c (ReconfigureWindowsMenu):
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | win/tkWinInt.h | 4 | ||||
-rw-r--r-- | win/tkWinMenu.c | 7 | ||||
-rw-r--r-- | win/tkWinX.c | 6 |
4 files changed, 16 insertions, 5 deletions
@@ -1,5 +1,9 @@ 2004-05-03 Jeff Hobbs <jeffh@ActiveState.com> + * win/tkWinX.c: fix drawing of unicode chars in menu + * win/tkWinInt.h (TkWinProcs): titles. [Bug #904371] (riefenstahl) + * win/tkWinMenu.c (ReconfigureWindowsMenu): + * generic/tkClipboard.c: Move TkClipCleanup from tkClipboard.c * macosx/tkMacOSXXStubs.c: to being implemented in a platform * unix/tkUnixEvent.c: specific manner. The cleanup order was diff --git a/win/tkWinInt.h b/win/tkWinInt.h index cbe2290..17e8d14 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -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: tkWinInt.h,v 1.14 2003/02/26 02:47:05 hobbs Exp $ + * RCS: @(#) $Id: tkWinInt.h,v 1.15 2004/05/03 22:40:30 hobbs Exp $ */ #ifndef _TKWININT @@ -187,6 +187,8 @@ typedef struct TkWinProcs { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam); + BOOL (WINAPI *insertMenu)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem); } TkWinProcs; EXTERN TkWinProcs *tkWinProcs; diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index be00a5f..69f8eb7 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.31 2004/01/07 13:25:56 vincentdarley Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.32 2004/05/03 22:40:30 hobbs Exp $ */ #define OEMRESOURCE @@ -574,7 +574,7 @@ ReconfigureWindowsMenu( itemText = GetEntryText(mePtr); if ((menuPtr->menuType == MENUBAR) || (menuPtr->menuFlags & MENU_SYSTEM_MENU)) { - Tcl_UtfToExternalDString(NULL, itemText, -1, &translatedText); + Tcl_WinUtfToTChar(itemText, -1, &translatedText); lpNewItem = Tcl_DStringValue(&translatedText); flags |= MF_STRING; } else { @@ -686,7 +686,8 @@ ReconfigureWindowsMenu( } } if (!systemMenu) { - InsertMenu(winMenuHdl, 0xFFFFFFFF, flags, itemID, lpNewItem); + (*tkWinProcs->insertMenu)(winMenuHdl, 0xFFFFFFFF, flags, + itemID, lpNewItem); } Tcl_DStringFree(&translatedText); if (itemText != NULL) { diff --git a/win/tkWinX.c b/win/tkWinX.c index 28b83fe..bd8e75c 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -10,7 +10,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.29 2004/05/03 22:28:45 hobbs Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.30 2004/05/03 22:40:30 hobbs Exp $ */ #include "tkWinInt.h" @@ -58,6 +58,8 @@ static TkWinProcs asciiProcs = { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExA, + (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuA, }; static TkWinProcs unicodeProcs = { @@ -73,6 +75,8 @@ static TkWinProcs unicodeProcs = { LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExW, + (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, + UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuW, }; TkWinProcs *tkWinProcs; |