diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-30 20:27:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-30 20:27:23 +0000 |
commit | a8c93cfbf235c31cf604cb6bd40009e9bf88f36a (patch) | |
tree | 0eaf9592ee3cd752e8f2d0273132de0004aa1f6e /protocols/JabberG/src/jabber_menu.cpp | |
parent | 6b893bc94df93321a216ba62c3d56a6e08086e36 (diff) |
- 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
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 88f3746d36..e241a5200c 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -579,24 +579,8 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM) void CJabberProto::MenuInit()
{
- HGENMENU hJabberRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (hJabberRoot == NULL) {
- CMenuItem mi;
- mi.name.t = m_tszUserName;
- mi.position = -1999901006;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hIcolibItem = m_hProtoIcon;
- hJabberRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
- }
- else {
- if (m_hMenuRoot) {
- Menu_RemoveItem(m_hMenuRoot);
- m_hMenuRoot = NULL;
- }
- }
-
CMenuItem mi;
- mi.root = hJabberRoot;
+ mi.root = m_hMenuRoot = Menu_GetProtocolRoot(this);
// "Bookmarks..."
mi.pszService = "/Bookmarks";
@@ -693,7 +677,7 @@ void CJabberProto::MenuInit() mi.pszService = NULL;
mi.position = 200006;
- mi.root = hJabberRoot;
+ mi.root = m_hMenuRoot;
mi.name.a = LPGEN("Resource priority");
mi.flags = CMIF_HIDDEN;
m_hMenuPriorityRoot = Menu_AddProtoMenuItem(&mi);
@@ -743,7 +727,7 @@ void CJabberProto::MenuInit() m_pepServices.RebuildMenu();
CheckMenuItems();
- NotifyFastHook(hStatusMenuInit, (WPARAM)hJabberRoot, (LPARAM)(IJabberInterface*)this);
+ NotifyFastHook(hStatusMenuInit, (WPARAM)m_hMenuRoot, (LPARAM)(IJabberInterface*)this);
}
//////////////////////////////////////////////////////////////////////////
@@ -876,10 +860,6 @@ void CJabberProto::GlobalMenuUninit() m_phMenuResourceItems = NULL;
}
m_nMenuResourceItems = 0;
-
- if (m_hMenuRoot)
- Menu_RemoveItem(m_hMenuRoot);
- m_hMenuRoot = NULL;
}
void CJabberProto::EnableMenuItems(BOOL bEnable)
|