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 | |
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')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 43 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.h | 1 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/sessions.cpp | 2 |
4 files changed, 16 insertions, 38 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);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index a3c8ba8141..d77fb87d72 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -94,9 +94,6 @@ GGPROTO::~GGPROTO() Popup_UnregisterClass(hPopupError);
Popup_UnregisterClass(hPopupNotify);
- if (hMenuRoot)
- Menu_RemoveItem(hMenuRoot);
-
// Close handles
Netlib_CloseHandle(m_hNetlibUser);
@@ -763,11 +760,6 @@ int GGPROTO::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) menus_init();
break;
- case EV_PROTO_ONRENAME:
- if (hMenuRoot)
- Menu_ModifyItem(hMenuRoot, m_tszUserName);
- break;
-
case EV_PROTO_ONCONTACTDELETED:
return contactdeleted(wParam, lParam);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index 45a1ec9899..5b6f79292c 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -243,7 +243,6 @@ struct GGPROTO : public PROTO<GGPROTO> TCHAR *offline;
} modemsg;
- HGENMENU hMenuRoot;
HGENMENU hMainMenu[7];
HGENMENU hBlockMenuItem, hImageMenuItem, hInstanceMenuItem;
HANDLE hPrebuildMenuHook;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 640aec001d..001d2189b9 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -422,7 +422,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) mi.pszService = GGS_CONCUR_SESS;
CreateProtoService(mi.pszService, &GGPROTO::sessions_view);
- mi.position = (hMenuRoot) ? 2050000001 : 200003;
+ mi.position = 200003;
mi.hIcolibItem = iconList[16].hIcolib;
mi.name.t = LPGENT("Concurrent &sessions");
Menu_AddProtoMenuItem(&mi, m_szModuleName);
|