summaryrefslogtreecommitdiff
path: root/protocols/AimOscar
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/AimOscar
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/AimOscar')
-rw-r--r--protocols/AimOscar/src/theme.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index c51a5fb3eb..321630221c 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -209,13 +209,9 @@ int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
void CAimProto::InitMainMenus(void)
{
- //Do not put any services below HTML get away message!!!
- char service_name[200];
-
- CLISTMENUITEM mi = { 0 };
-
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle("aim");
mi.name.t = m_tszUserName;
@@ -229,30 +225,29 @@ void CAimProto::InitMainMenus(void)
}
}
- mi.pszService = service_name;
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
- mi.flags = 0;
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/ManageAccount");
- CreateProtoService("/ManageAccount", &CAimProto::ManageAccount);
+ mi.pszService = "/ManageAccount";
+ CreateProtoService(mi.pszService, &CAimProto::ManageAccount);
mi.position = 201001;
mi.icolibItem = GetIconHandle("aim");
mi.name.a = LPGEN("Manage Account");
- hMainMenu[0] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/InstantIdle");
- CreateProtoService("/InstantIdle",&CAimProto::InstantIdle);
+ mi.pszService = "/InstantIdle";
+ CreateProtoService(mi.pszService, &CAimProto::InstantIdle);
mi.position = 201002;
mi.icolibItem = GetIconHandle("idle");
mi.name.a = LPGEN("Instant Idle");
- hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/JoinChatRoom");
- CreateProtoService("/JoinChatRoom", &CAimProto::JoinChatUI);
+ mi.pszService = "/JoinChatRoom";
+ CreateProtoService(mi.pszService, &CAimProto::JoinChatUI);
mi.position = 201003;
mi.icolibItem = GetIconHandle("aol");
mi.name.a = LPGEN( "Join Chat Room" );
- hMainMenu[2] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
void CAimProto::InitContactMenus(void)