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/VKontakte/src/vk_proto.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/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index c342ba326a..1ab461cc26 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -191,43 +191,39 @@ void CVkProto::InitMenus() CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
- char szService[100];
-
CLISTMENUITEM mi = { 0 };
- mi.pszService = szService;
+ mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
// Proto menu
- mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
-
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_CREATECHAT);
+ mi.pszService = PS_CREATECHAT;
mi.position = 10009 + PMI_CREATECHAT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
mi.name.a = LPGEN("Create new chat");
- g_hProtoMenuItems[PMI_CREATECHAT] = Menu_AddProtoMenuItem(&mi);
+ g_hProtoMenuItems[PMI_CREATECHAT] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_SETSTATUSMSG);
+ mi.pszService = PS_SETSTATUSMSG;
mi.position = 10009 + PMI_SETSTATUSMSG;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_STATUS));
mi.name.a = LPGEN("Status message");
- g_hProtoMenuItems[PMI_SETSTATUSMSG] = Menu_AddProtoMenuItem(&mi);
+ g_hProtoMenuItems[PMI_SETSTATUSMSG] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_WALLPOST);
+ mi.pszService = PS_WALLPOST;
mi.position = 10009 + PMI_WALLPOST;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL));
mi.name.a = LPGEN("Send message to my wall");
- g_hProtoMenuItems[PMI_WALLPOST] = Menu_AddProtoMenuItem(&mi);
+ g_hProtoMenuItems[PMI_WALLPOST] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_LOADVKNEWS);
+ mi.pszService = PS_LOADVKNEWS;
mi.position = 10009 + PMI_LOADVKNEWS;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
mi.name.a = LPGEN("Load news from VK");
- g_hProtoMenuItems[PMI_LOADVKNEWS] = Menu_AddProtoMenuItem(&mi);
+ g_hProtoMenuItems[PMI_LOADVKNEWS] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_VISITPROFILE);
+ mi.pszService = PS_VISITPROFILE;
mi.position = 10009 + PMI_VISITPROFILE;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_VISITPROFILE));
mi.name.a = LPGEN("Visit profile");
- g_hProtoMenuItems[PMI_VISITPROFILE] = Menu_AddProtoMenuItem(&mi);
+ g_hProtoMenuItems[PMI_VISITPROFILE] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Contact Menu Items
mi.hParentMenu = NULL;
|