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/FacebookRM/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/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 20 |
2 files changed, 2 insertions, 19 deletions
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 33cdd19bfe..9e4dafbab5 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -234,7 +234,6 @@ public: bool RunCaptchaForm(std::string imageUrl, std::string &result); // Menu items - HGENMENU m_hMenuRoot; HGENMENU m_hMenuServicesRoot; HGENMENU m_hStatusMind; diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 1c0abafb6d..adc1214647 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -208,25 +208,9 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
{
- HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (hRoot == NULL) {
- CMenuItem miRoot;
- miRoot.position = 500085000;
- miRoot.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
- miRoot.hIcolibItem = GetIconHandle("facebook");
- miRoot.name.t = m_tszUserName;
- hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&miRoot);
- }
- else {
- if (m_hMenuRoot) {
- Menu_RemoveItem(m_hMenuRoot);
- m_hMenuRoot = NULL;
- }
- }
-
CMenuItem mi;
mi.position = 201001;
- mi.root = hRoot;
+ mi.root = Menu_GetProtocolRoot(this);
mi.pszService = "/Mind";
CreateProtoService(mi.pszService, &FacebookProto::OnMind);
@@ -275,7 +259,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) void FacebookProto::ToggleStatusMenuItems(bool bEnable)
{
- Menu_EnableItem(m_hMenuRoot, bEnable);
+ Menu_EnableItem(m_hMainMenuItem, bEnable);
Menu_EnableItem(m_hStatusMind, bEnable);
Menu_EnableItem(m_hMenuServicesRoot, bEnable);
}
|