diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
commit | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch) | |
tree | b3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /protocols/IRCG | |
parent | 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff) |
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 16 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 8 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 6 |
3 files changed, 9 insertions, 21 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index f9e373e44b..4567f48602 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2298,11 +2298,9 @@ void CIrcProto::OnIrcDisconnected() memcpy(m_nick, m_pNick, sizeof(m_nick));
setTString("Nick", m_pNick);
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS | CMIF_GRAYED;
- Menu_ModifyItem(hMenuJoin, &mi);
- Menu_ModifyItem(hMenuList, &mi);
- Menu_ModifyItem(hMenuNick, &mi);
+ Menu_ModifyItem(hMenuJoin, NULL, INVALID_HANDLE_VALUE, CMIF_GRAYED);
+ Menu_ModifyItem(hMenuList, NULL, INVALID_HANDLE_VALUE, CMIF_GRAYED);
+ Menu_ModifyItem(hMenuNick, NULL, INVALID_HANDLE_VALUE, CMIF_GRAYED);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2329,11 +2327,9 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) bPerformDone = true;
nickflag = true;
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS;
- Menu_ModifyItem(hMenuJoin, &mi);
- Menu_ModifyItem(hMenuList, &mi);
- Menu_ModifyItem(hMenuNick, &mi);
+ Menu_ModifyItem(hMenuJoin, NULL, INVALID_HANDLE_VALUE, 0);
+ Menu_ModifyItem(hMenuList, NULL, INVALID_HANDLE_VALUE, 0);
+ Menu_ModifyItem(hMenuNick, NULL, INVALID_HANDLE_VALUE, 0);
int Temp = m_iStatus;
m_iStatus = ID_STATUS_ONLINE;
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 378aee6063..89cb66953b 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -840,12 +840,8 @@ int __cdecl CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l break;
case EV_PROTO_ONRENAME:
- if (hMenuRoot) {
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.ptszName = m_tszUserName;
- Menu_ModifyItem(hMenuRoot, &mi);
- }
+ if (hMenuRoot)
+ Menu_ModifyItem(hMenuRoot, m_tszUserName);
break;
case EV_PROTO_ONCONTACTDELETED:
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index d8296b0fec..f741aa9525 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -730,11 +730,7 @@ void CConnectPrefsDlg::OnApply() m_proto->m_oldStyleModes = m_oldStyle.GetState();
m_proto->m_useServer = m_useServer.GetState();
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS;
- if (!m_proto->m_useServer)
- mi.flags |= CMIF_GRAYED;
- Menu_ModifyItem(m_proto->hMenuServer, &mi);
+ Menu_ModifyItem(m_proto->hMenuServer, NULL, INVALID_HANDLE_VALUE, (m_proto->m_useServer) ? 0 : CMIF_GRAYED);
m_proto->m_joinOnInvite = m_autoJoin.GetState();
m_proto->m_hideServerWindow = !m_showServer.GetState();
|