From a8c93cfbf235c31cf604cb6bd40009e9bf88f36a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Jun 2015 20:27:23 +0000 Subject: - fix for the old perversion with manual protocol root calculation; - protocol menu root is always created by the core; - other minor problems with protocol menus in main menu went away git-svn-id: http://svn.miranda-ng.org/main/trunk@14462 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_menu.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'protocols/MSN/src/msn_menu.cpp') diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 2458b7aeb1..43b52d153b 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -269,22 +269,7 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM) void CMsnProto::MsnInitMainMenu(void) { CMenuItem mi; - - HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName); - if (hRoot == NULL) { - mi.position = 500085000; - mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; - mi.hIcolibItem = GetIconHandle(IDI_MSN); - mi.name.t = m_tszUserName; - hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi); - } - else { - MsnRemoveMainMenus(); - mainMenuRoot = NULL; - } - - mi.flags = 0; - mi.root = hRoot; + mi.root = Menu_GetProtocolRoot(this); #ifdef OBSOLETE mi.pszService = MS_SET_NICKNAME_UI; @@ -326,12 +311,6 @@ void CMsnProto::MsnInitMainMenu(void) MSN_EnableMenuItems(m_iStatus >= ID_STATUS_ONLINE); } -void CMsnProto::MsnRemoveMainMenus(void) -{ - if (mainMenuRoot) - Menu_RemoveItem(mainMenuRoot); -} - void CMsnProto::MSN_EnableMenuItems(bool bEnable) { for (int i = 0; i < _countof(menuItemsMain); i++) -- cgit v1.2.3