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/MSN | |
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/MSN')
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index a70494628c..334d51c66f 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -268,10 +268,6 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM) void CMsnProto::MsnInitMainMenu(void)
{
- char servicefunction[100];
- mir_strcpy(servicefunction, m_szModuleName);
- char* tDest = servicefunction + mir_strlen(servicefunction);
-
CLISTMENUITEM mi = { 0 };
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
@@ -289,44 +285,43 @@ void CMsnProto::MsnInitMainMenu(void) mi.flags = 0;
mi.hParentMenu = hRoot;
- mi.pszService = servicefunction;
#ifdef OBSOLETE
- mir_strcpy(tDest, MS_SET_NICKNAME_UI);
- CreateProtoService(MS_SET_NICKNAME_UI, &CMsnProto::SetNicknameUI);
+ mi.pszService = MS_SET_NICKNAME_UI;
+ CreateProtoService(mi.pszService, &CMsnProto::SetNicknameUI);
mi.position = 201001;
mi.icolibItem = GetIconHandle(IDI_MSN);
mi.name.a = LPGEN("Set &Nickname");
- menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
+ menuItemsMain[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
#endif
- mir_strcpy(tDest, MSN_INVITE);
- CreateProtoService(MSN_INVITE, &CMsnProto::MsnInviteCommand);
+ mi.pszService = MSN_INVITE;
+ CreateProtoService(mi.pszService, &CMsnProto::MsnInviteCommand);
mi.position = 201002;
mi.icolibItem = GetIconHandle(IDI_INVITE);
mi.name.a = LPGEN("Create &Chat");
- menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
+ menuItemsMain[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_strcpy(tDest, MS_GOTO_INBOX);
- CreateProtoService(MS_GOTO_INBOX, &CMsnProto::MsnGotoInbox);
+ mi.pszService = MS_GOTO_INBOX;
+ CreateProtoService(mi.pszService, &CMsnProto::MsnGotoInbox);
mi.position = 201003;
mi.icolibItem = GetIconHandle(IDI_INBOX);
mi.name.a = LPGEN("Display &Hotmail Inbox");
- menuItemsMain[1] = Menu_AddProtoMenuItem(&mi);
+ menuItemsMain[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_strcpy(tDest, MS_EDIT_PROFILE);
- CreateProtoService(MS_EDIT_PROFILE, &CMsnProto::MsnEditProfile);
+ mi.pszService = MS_EDIT_PROFILE;
+ CreateProtoService(mi.pszService, &CMsnProto::MsnEditProfile);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
mi.name.a = LPGEN("View &Profile");
- menuItemsMain[2] = Menu_AddProtoMenuItem(&mi);
+ menuItemsMain[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_strcpy(tDest, MS_EDIT_ALERTS);
- CreateProtoService(MS_EDIT_ALERTS, &CMsnProto::MsnSetupAlerts);
+ mi.pszService = MS_EDIT_ALERTS;
+ CreateProtoService(mi.pszService, &CMsnProto::MsnSetupAlerts);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
mi.name.a = LPGEN("Setup Live &Alerts");
- menuItemsMain[3] = Menu_AddProtoMenuItem(&mi);
+ menuItemsMain[3] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
MSN_EnableMenuItems(m_iStatus >= ID_STATUS_ONLINE);
}
|