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/Gadu-Gadu/src/gg.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/Gadu-Gadu/src/gg.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index cdcca1a571..cf9f0aad10 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -257,34 +257,21 @@ void GGPROTO::block_uninit() // Menus initialization
void GGPROTO::menus_init()
{
- CMenuItem mi;
-
- HGENMENU hGCRoot, hCLRoot, hRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (hRoot == NULL) {
- mi.name.t = m_tszUserName;
- mi.position = 500090000;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hIcolibItem = iconList[0].hIcolib;
- hGCRoot = hCLRoot = hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
- }
- else {
- mi.root = hRoot;
- mi.flags = CMIF_TCHAR;
-
- mi.name.t = LPGENT("Conference");
- mi.position = 200001;
- mi.hIcolibItem = iconList[14].hIcolib;
- hGCRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- mi.name.t = LPGENT("Contact list");
- mi.position = 200002;
- mi.hIcolibItem = iconList[7].hIcolib;
- hCLRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- if (hMenuRoot)
- Menu_RemoveItem(hMenuRoot);
- hMenuRoot = NULL;
- }
+ HGENMENU hRoot = Menu_GetProtocolRoot(this);
+
+ CMenuItem mi;
+ mi.root = hRoot;
+ mi.flags = CMIF_TCHAR;
+
+ mi.name.t = LPGENT("Conference");
+ mi.position = 200001;
+ mi.hIcolibItem = iconList[14].hIcolib;
+ HGENMENU hGCRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
+
+ mi.name.t = LPGENT("Contact list");
+ mi.position = 200002;
+ mi.hIcolibItem = iconList[7].hIcolib;
+ HGENMENU hCLRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
gc_menus_init(hGCRoot);
import_init(hCLRoot);
|