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/AimOscar/src/proto.cpp | 5 ----- protocols/AimOscar/src/proto.h | 1 - protocols/AimOscar/src/theme.cpp | 18 +----------------- 3 files changed, 1 insertion(+), 23 deletions(-) (limited to 'protocols/AimOscar') diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 6097af60cb..4dc782f75a 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -703,11 +703,6 @@ int __cdecl CAimProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l } break; - case EV_PROTO_ONRENAME: - if (hMenuRoot) - Menu_ModifyItem(hMenuRoot, m_tszUserName); - break; - case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h index 5ee46474c8..ea4688b1ef 100644 --- a/protocols/AimOscar/src/proto.h +++ b/protocols/AimOscar/src/proto.h @@ -133,7 +133,6 @@ struct CAimProto : public PROTO HANDLE hDirectBoundPort;//direct connection listening port //Handles for the context menu items - HGENMENU hMenuRoot; HGENMENU hHTMLAwayContextMenuItem; HGENMENU hAddToServerListContextMenuItem; HGENMENU hBlockContextMenuItem; diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index de5f0a4220..c419b3d1ec 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -209,24 +209,8 @@ int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) void CAimProto::InitMainMenus(void) { - HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName); - if (hRoot == NULL) { - CMenuItem mi; - mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; - mi.hIcolibItem = GetIconHandle("aim"); - mi.name.t = m_tszUserName; - mi.position = 500090000; - hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi); - } - else { - if (hMenuRoot) { - Menu_RemoveItem(hMenuRoot); - hMenuRoot = NULL; - } - } - CMenuItem mi; - mi.root = hRoot; + mi.root = Menu_GetProtocolRoot(this); mi.pszService = "/ManageAccount"; CreateProtoService(mi.pszService, &CAimProto::ManageAccount); -- cgit v1.2.3