summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-27 13:13:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-27 13:13:05 +0000
commit5b801c67f45f6f0c0cb148fca1c0e54b1a4e8f87 (patch)
tree21def3a711588458ed8bbfbf7711dfd536773192 /protocols
parent6716335aa202dafbea719cab9ecc860624075f4f (diff)
fixes for xstatus menus
git-svn-id: http://svn.miranda-ng.org/main/trunk@14413 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp14
-rw-r--r--protocols/MRA/src/Mra_menus.cpp15
2 files changed, 23 insertions, 6 deletions
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 122d26816a..4ac9729559 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -851,14 +851,22 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
if (m_bHideXStatusUI || m_bHideXStatusMenu)
return;
- CLISTMENUITEM mi = { 0 };
- mi.position = 2000040000;
+ HGENMENU hRoot;
{
TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), TranslateT("%s Custom Status"), m_tszUserName);
- mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szItem, 500084000);
+
+ CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
+ mi.name.t = szItem;
+ mi.position = 10001;
+ hRoot = Menu_AddStatusMenuItem(&mi);
}
+ CLISTMENUITEM mi = { 0 };
+ mi.position = 2000040000;
+ mi.hParentMenu = hRoot;
+
for (int i = 0; i <= XSTATUS_COUNT; i++) {
char srvFce[MAX_PATH + 64];
mir_snprintf(srvFce, _countof(srvFce), "/menuXStatus%d", i);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index 2624a00a3c..c935384d93 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -279,12 +279,21 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM)
{
CHAR szServiceFunction[MAX_PATH], szValueName[MAX_PATH];
- TCHAR szItem[MAX_PATH + 64];
- mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
+ HGENMENU hRoot;
+ {
+ TCHAR szItem[MAX_PATH + 64];
+ mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
+
+ CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
+ mi.name.t = szItem;
+ mi.position = 10001;
+ hRoot = Menu_AddStatusMenuItem(&mi);
+ }
CLISTMENUITEM mi = { 0 };
mi.position = 2000060000;
- mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szItem, 500085000);
+ mi.hParentMenu = hRoot;
mi.flags = CMIF_UNICODE;
mi.pszService = szServiceFunction;