summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/services.cpp
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/IRCG/src/services.cpp
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/IRCG/src/services.cpp')
-rw-r--r--protocols/IRCG/src/services.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 5dab9c9973..095b23b114 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -23,15 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void CIrcProto::InitMainMenus(void)
{
- char temp[MAXMODULELABELLENGTH];
- char *d = temp + mir_snprintf(temp, _countof(temp), m_szModuleName);
-
- CLISTMENUITEM mi = { 0 };
- mi.pszService = temp;
-
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
// Root popupmenuitem
+ CLISTMENUITEM mi = { 0 };
mi.name.t = m_tszUserName;
mi.position = -1999901010;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -45,40 +40,41 @@ void CIrcProto::InitMainMenus(void)
}
}
- mi.flags = 0;
+ CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = hRoot;
+
mi.name.a = LPGEN("&Quick connect");
mi.icolibItem = GetIconHandle(IDI_QUICK);
- mir_strcpy(d, IRC_QUICKCONNECT);
+ mi.pszService = IRC_QUICKCONNECT;
mi.position = 201001;
- mi.hParentMenu = hRoot;
- hMenuQuick = Menu_AddProtoMenuItem(&mi);
+ hMenuQuick = Menu_AddProtoMenuItem(&mi, m_szModuleName);
if (m_iStatus != ID_STATUS_OFFLINE) mi.flags |= CMIF_GRAYED;
mi.name.a = LPGEN("&Join channel");
mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN);
- mir_strcpy(d, IRC_JOINCHANNEL);
+ mi.pszService = IRC_JOINCHANNEL;
mi.position = 201002;
- hMenuJoin = Menu_AddProtoMenuItem(&mi);
+ hMenuJoin = Menu_AddProtoMenuItem(&mi, m_szModuleName);
mi.name.a = LPGEN("&Change your nickname");
mi.icolibItem = GetIconHandle(IDI_RENAME);
- mir_strcpy(d, IRC_CHANGENICK);
+ mi.pszService = IRC_CHANGENICK;
mi.position = 201003;
- hMenuNick = Menu_AddProtoMenuItem(&mi);
+ hMenuNick = Menu_AddProtoMenuItem(&mi, m_szModuleName);
mi.name.a = LPGEN("Show the &list of available channels");
mi.icolibItem = GetIconHandle(IDI_LIST);
- mir_strcpy(d, IRC_SHOWLIST);
+ mi.pszService = IRC_SHOWLIST;
mi.position = 201004;
- hMenuList = Menu_AddProtoMenuItem(&mi);
+ hMenuList = Menu_AddProtoMenuItem(&mi, m_szModuleName);
if (m_useServer) mi.flags &= ~CMIF_GRAYED;
mi.name.a = LPGEN("&Show the server window");
mi.icolibItem = GetIconHandle(IDI_SERVER);
- mir_strcpy(d, IRC_SHOWSERVER);
+ mi.pszService = IRC_SHOWSERVER;
mi.position = 201005;
- hMenuServer = Menu_AddProtoMenuItem(&mi);
+ hMenuServer = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
/////////////////////////////////////////////////////////////////////////////////////////