diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-27 12:54:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-27 12:54:43 +0000 |
commit | 3234474db8b36b1a644d8686c5a54d261748769f (patch) | |
tree | b01f6af0e7bca040d9b1b1fba66db2564a940217 /protocols/JabberG/src/jabber_privacy.cpp | |
parent | d8be737e63c38f6a3a293158351b1fa4d62ecba6 (diff) |
fix for the protocols' menus
git-svn-id: http://svn.miranda-ng.org/main/trunk@14411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_privacy.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 27b686607f..48b3900a8d 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2098,8 +2098,8 @@ void CJabberProto::BuildPrivacyMenu() mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
m_hPrivacyMenuRoot = Menu_AddProtoMenuItem(&mi);
- CreateProtoService("/PrivacyLists", &CJabberProto::OnMenuHandlePrivacyLists);
mi.pszService = "/PrivacyLists";
+ CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandlePrivacyLists);
mi.position = 3000040000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = GetIconHandle(IDI_PRIVACY_LISTS);
@@ -2118,7 +2118,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) mir_cslock lck(m_privacyListManager.m_cs);
- char srvFce[MAX_PATH + 64], *svcName = srvFce + mir_strlen(m_szModuleName);
+ char srvFce[MAX_PATH + 64];
CLISTMENUITEM mi = { 0 };
mi.position = 2000040000;
@@ -2127,22 +2127,22 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) mi.pszService = srvFce;
int i = 0;
- mir_snprintf(srvFce, _countof(srvFce), "%s/menuPrivacy%d", m_szModuleName, i);
+ mir_snprintf(srvFce, _countof(srvFce), "/menuPrivacy%d", i);
if (i > m_privacyMenuServiceAllocated) {
- CreateProtoServiceParam(svcName, &CJabberProto::menuSetPrivacyList, i);
+ CreateProtoServiceParam(srvFce, &CJabberProto::menuSetPrivacyList, i);
m_privacyMenuServiceAllocated = i;
}
mi.position++;
mi.icolibItem = Skin_GetIconHandle(m_privacyListManager.GetActiveListName() ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
mi.name.t = LPGENT("<none>");
- m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
+ m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi, m_szModuleName));
for (CPrivacyList *pList = m_privacyListManager.GetFirstList(); pList; pList = pList->GetNext()) {
i++;
- mir_snprintf(srvFce, _countof(srvFce), "%s/menuPrivacy%d", m_szModuleName, i);
+ mir_snprintf(srvFce, _countof(srvFce), "/menuPrivacy%d", i);
if (i > m_privacyMenuServiceAllocated) {
- CreateProtoServiceParam(svcName, &CJabberProto::menuSetPrivacyList, i);
+ CreateProtoServiceParam(srvFce, &CJabberProto::menuSetPrivacyList, i);
m_privacyMenuServiceAllocated = i;
}
@@ -2150,6 +2150,6 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) mi.icolibItem = Skin_GetIconHandle(
mir_tstrcmp(m_privacyListManager.GetActiveListName(), pList->GetListName()) ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
mi.name.t = pList->GetListName();
- m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
+ m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi, m_szModuleName));
}
}
|