summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-27 12:54:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-27 12:54:43 +0000
commit3234474db8b36b1a644d8686c5a54d261748769f (patch)
treeb01f6af0e7bca040d9b1b1fba66db2564a940217 /protocols/WhatsApp
parentd8be737e63c38f6a3a293158351b1fa4d62ecba6 (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/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/theme.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index 4595692cc7..b5fe0ad6b5 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -47,15 +47,9 @@ static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact)
int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
{
- char text[200];
- mir_strcpy(text, m_szModuleName);
- char *tDest = text + mir_strlen(text);
-
- CLISTMENUITEM mi = { 0 };
- mi.pszService = text;
-
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
+ CLISTMENUITEM mi = { 0 };
mi.position = 500085000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (isOnline() ? 0 : CMIF_GRAYED);
mi.icolibItem = GetIconHandle("whatsApp");
@@ -69,16 +63,16 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
}
}
+ CLISTMENUITEM mi = { 0 };
mi.flags = (isOnline() ? 0 : CMIF_GRAYED);
mi.position = 201001;
- CreateProtoService("/CreateGroup", &WhatsAppProto::OnCreateGroup);
- mir_strcpy(tDest, "/CreateGroup");
+ mi.pszService = "/CreateGroup";
+ CreateProtoService(mi.pszService, &WhatsAppProto::OnCreateGroup);
mi.hParentMenu = hRoot;
mi.name.a = LPGEN("Create group");
mi.icolibItem = GetIconHandle("createGroup");
- m_hMenuCreateGroup = Menu_AddProtoMenuItem(&mi);
-
+ m_hMenuCreateGroup = Menu_AddProtoMenuItem(&mi, m_szModuleName);
return 0;
}