From 3234474db8b36b1a644d8686c5a54d261748769f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 27 Jun 2015 12:54:43 +0000 Subject: fix for the protocols' menus git-svn-id: http://svn.miranda-ng.org/main/trunk@14411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_menus.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'protocols/Steam') diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index 13fbb9fddd..5ec4a180b1 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -96,15 +96,9 @@ int CSteamProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) void CSteamProto::OnInitStatusMenu() { - char text[200]; - mir_strncpy(text, m_szModuleName, 100); - char* tDest = text + mir_strlen(text); - - CLISTMENUITEM mi = { 0 }; - mi.pszService = text; - HGENMENU hSteamRoot = Menu_GetProtocolRoot(m_szModuleName); if (!hSteamRoot) { + CLISTMENUITEM mi = { 0 }; mi.name.t = m_tszUserName; mi.position = -1999901006; mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; @@ -115,16 +109,15 @@ void CSteamProto::OnInitStatusMenu() m_hMenuRoot = NULL; } + CLISTMENUITEM mi = { 0 }; mi.hParentMenu = hSteamRoot; - mi.flags = CMIF_TCHAR; // Show block list - mir_strcpy(tDest, "/BlockList"); - CreateProtoService(tDest, &CSteamProto::OpenBlockListCommand); + mi.pszService = "/BlockList"; + CreateProtoService(mi.pszService, &CSteamProto::OpenBlockListCommand); mi.name.t = LPGENT("Blocked contacts"); mi.position = 200000 + SMI_BLOCKED_LIST; - //mi.icolibItem = NULL; - Menu_AddProtoMenuItem(&mi); + Menu_AddProtoMenuItem(&mi, m_szModuleName); } void CSteamProto::InitMenus() -- cgit v1.2.3