From edf8a68513909e44aa1ca46cfe98e9cce18a856b Mon Sep 17 00:00:00 2001 From: sje Date: Wed, 4 Jul 2007 17:02:22 +0000 Subject: unicode contact menu patch (thx borkra) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@251 4f64403b-2f21-0410-a795-97e2b3489a10 --- metacontacts/meta_menu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'metacontacts/meta_menu.c') diff --git a/metacontacts/meta_menu.c b/metacontacts/meta_menu.c index 65c58a1..b2dbb96 100644 --- a/metacontacts/meta_menu.c +++ b/metacontacts/meta_menu.c @@ -467,12 +467,14 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) buf[0] = 0; } DBFreeVariant(&dbv); + mi.pszName = buf; + mi.flags = 0; } else { - strncpy(buf, (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0), 512); + mi.pszName = CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_UNICODE); + mi.flags = CMIF_UNICODE; } - mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON; - mi.pszName = buf; + mi.flags |= CMIM_FLAGS | CMIM_NAME | CMIM_ICON; //mi.hIcon = LoadSkinnedProtoIcon(proto, status); iconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0); @@ -548,3 +550,4 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) } + -- cgit v1.2.3