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 +---------------------- protocols/MSN/src/msn_proto.cpp | 7 ------- protocols/MSN/src/msn_proto.h | 2 -- 3 files changed, 1 insertion(+), 31 deletions(-) (limited to 'protocols/MSN/src') 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++) diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 8bf72194d9..5c9955d37b 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -151,8 +151,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : CMsnProto::~CMsnProto() { - MsnRemoveMainMenus(); - MSN_FreeGroups(); Threads_Uninit(); AvatarQueue_Uninit(); @@ -1230,11 +1228,6 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings); break; - case EV_PROTO_ONRENAME: - if (mainMenuRoot) - Menu_ModifyItem(mainMenuRoot, m_tszUserName); - break; - case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index 5020d88ad2..952c32db05 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -254,11 +254,9 @@ struct CMsnProto : public PROTO ///////////////////////////////////////////////////////////////////////////////////////// // MSN menus - HGENMENU mainMenuRoot; HGENMENU menuItemsMain[4]; void MsnInitMainMenu(void); - void MsnRemoveMainMenus(void); void MSN_EnableMenuItems(bool parEnable); void MsnInvokeMyURL(bool ismail, const char* url); -- cgit v1.2.3