diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 13:35:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 13:35:02 +0000 |
commit | b3506557a58f53ed0fc3a96c4ec4a3b8098a542d (patch) | |
tree | 520a1cb861afa7600c0553ce8b2558f725a70ed1 /protocols | |
parent | 4625aafb053a002f0223bfbe76abfbec629feacf (diff) |
- CLISTMENUITEM::cbSize - atavism removed;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14325 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
43 files changed, 73 insertions, 75 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 5df30f65a6..5eb4e8d814 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -708,7 +708,7 @@ int __cdecl CAimProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &clmi);
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index ed7bbf2c48..71b3a3b620 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -181,7 +181,7 @@ int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_FLAGS;
switch(pd_mode) {
case 1:
@@ -218,7 +218,7 @@ void CAimProto::InitMainMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
@@ -266,7 +266,7 @@ void CAimProto::InitContactMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = service_name;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 868593fad7..efd24e16dc 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -107,7 +107,7 @@ void InitContactMenus() {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000006000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Visit profile");
@@ -212,12 +212,12 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strncpy(text, m_szModuleName, 100);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
- CLISTMENUITEM miRoot = { sizeof(miRoot) };
+ CLISTMENUITEM miRoot = { 0 };
miRoot.popupPosition = 500085000;
miRoot.hParentMenu = HGENMENU_ROOT;
miRoot.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
@@ -293,7 +293,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) void FacebookProto::ToggleStatusMenuItems(BOOL bEnable)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS | ((bEnable) ? 0 : CMIF_GRAYED);
Menu_ModifyItem(m_hMenuRoot, &clmi);
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index 50e88caa18..db59455c4f 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -44,7 +44,7 @@ int InitMenus(WPARAM wParam, LPARAM lParam) mir_snprintf(szServiceName, _countof(szServiceName), "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX);
CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);
- CLISTMENUITEM cmi = { sizeof(cmi) };
+ CLISTMENUITEM cmi = { 0 };
cmi.flags = CMIF_CHILDPOPUP;
cmi.hParentMenu = HGENMENU(wParam);
cmi.hIcon = g_hPopupIcon;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index b5f5c81243..a70b5a6710 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -212,7 +212,7 @@ static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM lParam) if (gg == NULL)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
@@ -242,7 +242,7 @@ void GGPROTO::block_init() mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_BLOCKUSER);
CreateProtoService(GGS_BLOCKUSER, &GGPROTO::blockuser);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = -500050000;
mi.icolibItem = iconList[8].hIcolib;
@@ -266,7 +266,7 @@ void GGPROTO::block_uninit() // Menus initialization
void GGPROTO::menus_init()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hGCRoot, hCLRoot, hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 8a98d9428c..ec5cf9c603 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -765,7 +765,7 @@ int GGPROTO::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index d7a3c77528..9019e9278b 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -59,7 +59,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) if (gc_enabled) {
char service[64];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index f138aeecb1..3fbda53b9d 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -73,7 +73,7 @@ int GGPROTO::img_init() CreateProtoService(GGS_SENDIMAGE, &GGPROTO::img_sendimg);
// Send image contact menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = -2000010000;
mi.icolibItem = iconList[11].hIcolib;
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index d8a4001f43..b82554d567 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -519,7 +519,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_IMPORT_SERVER);
CreateProtoService(GGS_IMPORT_SERVER, &GGPROTO::import_server);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = 2000500001;
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index deff5e16c0..eb1f590f35 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -63,7 +63,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) for (int i=0; i < g_Instances.getCount(); i++) {
gg = g_Instances[i];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (gg->m_iStatus > ID_STATUS_OFFLINE) {
++items;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index c0fabf5a18..2e7339e74d 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -420,7 +420,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_CONCUR_SESS);
CreateProtoService(GGS_CONCUR_SESS, &GGPROTO::sessions_view);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = (hMenuRoot) ? 2050000001 : 200003;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index bc4c6ae607..f9e373e44b 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2298,7 +2298,7 @@ void CIrcProto::OnIrcDisconnected() memcpy(m_nick, m_pNick, sizeof(m_nick));
setTString("Nick", m_pNick);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
Menu_ModifyItem(hMenuJoin, &mi);
Menu_ModifyItem(hMenuList, &mi);
@@ -2329,7 +2329,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) bPerformDone = true;
nickflag = true;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(hMenuJoin, &mi);
Menu_ModifyItem(hMenuList, &mi);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 59a7924475..378aee6063 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -841,7 +841,7 @@ int __cdecl CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index eda6f4f40d..d8296b0fec 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -730,7 +730,7 @@ void CConnectPrefsDlg::OnApply() m_proto->m_oldStyleModes = m_oldStyle.GetState();
m_proto->m_useServer = m_useServer.GetState();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (!m_proto->m_useServer)
mi.flags |= CMIF_GRAYED;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 466e4c35dc..fc4a4ff834 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -26,7 +26,7 @@ void CIrcProto::InitMainMenus(void) char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, _countof(temp), m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = temp;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -139,7 +139,7 @@ void InitContactMenus(void) char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, _countof(temp), "IRC");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = temp;
mi.pszName = LPGEN("Channel &settings");
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 8114a6e72d..7ada6453fc 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -111,7 +111,7 @@ void g_MenuInit(void) char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
mir_strcpy(str, "ICQ");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = str;
// "Request authorization"
@@ -204,7 +204,7 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], m_bHideXStatusUI ? 0 : bXStatus != 0);
if (bXStatus && !m_bHideXStatusUI) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_ICON;
if (bXStatus > 0 && bXStatus <= XSTATUS_COUNT)
clmi.hIcon = getXStatusIcon(bXStatus, LR_SHARED);
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index d9d87ad116..a82e72e5dd 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -780,7 +780,7 @@ void CIcqProto::setXStatusEx(BYTE bXStatus, BYTE bQuiet) BYTE bOldXStatus = getByte(DBSETTING_XSTATUS_ID, 0);
if (!m_bHideXStatusUI) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (bOldXStatus <= XSTATUS_COUNT) {
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(hXStatusItems[bOldXStatus], &mi);
@@ -859,7 +859,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) mir_snprintf(szItem, _countof(szItem), Translate("%s Custom Status"), m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszPopupName = szItem;
mi.popupPosition = 500084000;
mi.position = 2000040000;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 3ba484b46c..0f5f9633db 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -196,7 +196,7 @@ void g_MenuInit(void) //////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
// "Request authorization"
mi.pszName = LPGEN("Request authorization");
@@ -357,7 +357,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) if ( ptrT( getTStringA(hContact, bIsChatRoom?(char*)"ChatRoomID":(char*)"jid")) != NULL) {
Menu_ShowItem(g_hMenuConvert, TRUE);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.pszName = bIsChatRoom ? (char *)LPGEN("&Convert to Contact") : (char *)LPGEN("&Convert to Chat Room");
clmi.flags = CMIM_NAME | CMIM_FLAGS;
Menu_ModifyItem(g_hMenuConvert, &clmi);
@@ -369,7 +369,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hMenuDirectPresence[0], TRUE);
for (int i=0; i < _countof(PresenceModeArray); i++) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_ICON | CMIM_FLAGS;
clmi.hIcon = (HICON)Skin_LoadProtoIcon(m_szModuleName, PresenceModeArray[i].mode);
Menu_ModifyItem(g_hMenuDirectPresence[i+1], &clmi);
@@ -415,7 +415,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hMenuResourcesRoot, TRUE);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_FLAGS;
mi.icolibItem = m_hProtoIcon;
Menu_ModifyItem(g_hMenuResourcesRoot, &mi);
@@ -455,7 +455,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) }
if (i < item->arResources.getCount()) {
pResourceStatus r(item->arResources[i]);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_TCHAR;
if (item->resourceMode == RSMODE_MANUAL && item->m_pManualResource == r)
clmi.flags |= CMIF_CHECKED;
@@ -605,7 +605,7 @@ void CJabberProto::MenuInit() strncpy(text, m_szModuleName, sizeof(text)-1);
char* tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hJabberRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -798,7 +798,7 @@ void CJabberProto::UpdatePriorityMenu(short priority) TCHAR szName[128];
mir_sntprintf(szName, TranslateT("Resource priority [%d]"), (int)priority);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_NAME | CMIF_KEEPUNTRANSLATED;
mi.ptszName = szName;
Menu_ModifyItem(m_hMenuPriorityRoot, &mi);
@@ -923,7 +923,7 @@ void CJabberProto::EnableMenuItems(BOOL bEnable) void CJabberProto::CheckMenuItems()
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS;
if (!m_menuItemsStatus)
clmi.flags |= CMIF_GRAYED;
@@ -1151,7 +1151,7 @@ CJabberProto* JabberChooseInstance(bool bIsLink) if (g_Instances[i]->m_options.ProcessXMPPLinks)
return g_Instances[i];
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
int nItems = 0, lastItemId = 0;
for (int i = 0; i < g_Instances.getCount(); i++) {
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index e7863ca056..7ade002960 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2090,7 +2090,7 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList) void CJabberProto::BuildPrivacyMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 200005;
mi.pszContactOwner = m_szModuleName;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
@@ -2123,7 +2123,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) char srvFce[MAX_PATH + 64], *svcName = srvFce + mir_strlen(m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 2000040000;
mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;
mi.hParentMenu = m_hPrivacyMenuRoot;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index b314175b67..2d4c9fd1f8 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -1320,7 +1320,7 @@ int __cdecl CJabberProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARA case EV_PROTO_ONRENAME:
if (m_hMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(m_hMenuRoot, &clmi);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 53959c0c83..3ae7a9bcea 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -465,7 +465,7 @@ void CPepGuiService::RebuildMenu() char szService[128];
mir_snprintf(szService, "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hJabberRoot;
mi.pszService = szService;
mi.position = 200010;
@@ -494,7 +494,7 @@ void CPepGuiService::UpdateMenuItem(HANDLE hIcolibIcon, TCHAR *text) if (!m_hMenuItem) return;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_ICON | CMIM_NAME;
mi.icolibItem = m_hIcolibItem;
mi.ptszName = m_szText ? m_szText : _T("<advanced status slot>");
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 2425c27ccc..981e58fa3d 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1060,7 +1060,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP dat->ppro->mraSetStringExW(NULL, szValueName, szBuff);
dat->ppro->mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, szBuff);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = (CMIM_NAME | CMIF_UNICODE);
mi.ptszName = szBuff;
Menu_ModifyItem(dat->ppro->hXStatusMenuItems[dat->dwXStatus], &mi);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index 5d2082a1fd..c8f74bae05 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -284,7 +284,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 2000060000;
mi.popupPosition = 500085000;
mi.ptszPopupName = szItem;
@@ -329,7 +329,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
char *pszServiceFunctionName = szServiceFunction + mir_strlen(m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRootMenu, (*fnAddFunc)(CLISTMENUITEM*);
if (bIsMain) {
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index e257a86e54..90874396bc 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -131,7 +131,7 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) int listId = Lists_GetMask(szEmail);
bool noChat = !(listId & LIST_FL) || isMe || isChatRoom(hContact);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME;
mi.pszName = ((listId & LIST_BL) ? LPGEN("&Unblock") : LPGEN("&Block"));
Menu_ModifyItem(hBlockMenuItem, &mi);
@@ -276,7 +276,7 @@ void CMsnProto::MsnInitMainMenu(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
@@ -344,7 +344,7 @@ void CMsnProto::MsnRemoveMainMenus(void) void CMsnProto::MSN_EnableMenuItems(bool bEnable)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (!bEnable)
mi.flags |= CMIF_GRAYED;
@@ -414,7 +414,7 @@ void MSN_InitContactMenu(void) mir_strcpy(servicefunction, "MSN");
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
mir_strcpy(tDest, MSN_BLOCK);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 298f1e2892..6dcc54d15f 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -1232,7 +1232,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (mainMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(mainMenuRoot, &clmi);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 836c94b507..6b2e6818c5 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -438,8 +438,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
MCONTACT hContact = (MCONTACT)wParam;
debugLog(_T("CSametimeProto::PrebuildContactMenu() hContact=[%x]"), hContact);
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1 ? 0 : CMIF_HIDDEN);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hLeaveChatMenuItem, (LPARAM)&mi);
@@ -513,7 +512,7 @@ void CSametimeProto::InitConferenceMenu() char service[128];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 11076a6284..551ab48a57 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -562,7 +562,7 @@ void CSametimeProto::InitSessionMenu() char service[128];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.popupPosition = 500085001;
mi.position = 2000060000;
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index d840a8f143..8f5cc22832 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -60,7 +60,7 @@ void CSkypeProto::InitMenus() //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- CLISTMENUITEM mi = { sizeof(CLISTMENUITEM) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -112,7 +112,7 @@ int CSkypeProto::OnInitStatusMenu() mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hStatusMunuRoot = MO_GetProtoRootMenu(m_szModuleName);
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index f59c2284a4..e67c73b3ed 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -100,7 +100,7 @@ void CSteamProto::OnInitStatusMenu() mir_strncpy(text, m_szModuleName, 100);
char* tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hSteamRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -139,7 +139,6 @@ void CSteamProto::InitMenus() //////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(CLISTMENUITEM);
mi.flags = CMIF_TCHAR;
// "Request authorization"
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 07b14b853e..66e1d9c6ee 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -264,7 +264,7 @@ void TlenProtocol::initMenuItems() strncpy_s(text, sizeof(text), m_szModuleName, _TRUNCATE);
char *pSvcName = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) }, clmi = { sizeof(clmi) };
+ CLISTMENUITEM mi = { 0 }, clmi = { sizeof(clmi) };
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 96b925d0b2..71233ee979 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -220,7 +220,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) }
}
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(proto->hMenuMUC, &mi);
if (proto->hMenuChats != NULL)
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 8fd1cb213d..8445565213 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -1160,7 +1160,7 @@ int TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPara case EV_PROTO_ONEXIT: return PreShutdown(0, 0);
case EV_PROTO_ONRENAME:
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 4c3c43769f..6cc8af6278 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -340,7 +340,7 @@ void __cdecl TlenServerThread(ThreadData *info) info->proto->isOnline = FALSE;
info->proto->isConnected = FALSE;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
Menu_ModifyItem(info->proto->hMenuMUC, &mi);
if (info->proto->hMenuChats != NULL)
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index db4bd40ef1..62781c3046 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -41,7 +41,7 @@ void CToxProto::InitMenus() //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- CLISTMENUITEM mi = { sizeof(CLISTMENUITEM) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -80,7 +80,7 @@ int CToxProto::OnInitStatusMenu() mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hStatusMunuRoot = MO_GetProtoRootMenu(m_szModuleName);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index fd3ba76d75..040ec7d13c 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -260,7 +260,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
mi.hParentMenu = hRoot;
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 71e6d0316b..2ffdc00f8b 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -86,7 +86,7 @@ void InitContactMenus() {
g_hMenuEvts[0] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -2000006000;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 61c372f5a9..edde181f3c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -191,7 +191,7 @@ void CVkProto::InitMenus() CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
char szService[100];
// Proto menu
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 6916acabf6..913d7b5aab 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -51,7 +51,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -84,7 +84,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) void WhatsAppProto::ToggleStatusMenuItems(BOOL bEnable)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS | ((bEnable) ? 0 : CMIF_GRAYED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuRoot, (LPARAM)&clmi);
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index f0bbccc50a..02029be589 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -436,7 +436,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) if (dbid < 0)
dbid = pos;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.popupPosition = 500084000;
mi.pszPopupName = Translate("Start game");
mi.pszContactOwner = protocolname;
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 643f97f037..2bf698f078 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -241,7 +241,7 @@ void Xfire_gamelist::clearGamelist() { //erstellt ein dummyeintrag
void Xfire_gamelist::createDummyMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500090001;
mi.pszName = Translate("Please wait...");
mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 6349e85c56..e42b373204 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1114,7 +1114,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateDirectoryA(AvatarsFolder, NULL);
//erweiterte Kontextmenüpunkte
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszPopupName = _T(protocolname);
mi.flags = CMIF_TCHAR;
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 2bafb22610..91d864b54b 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -640,7 +640,7 @@ int __cdecl CYahooProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM case EV_PROTO_ONRENAME:
if (mainMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(mainMenuRoot, &mi);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 9d79dd8d07..8f283495a1 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -369,7 +369,7 @@ void CYahooProto::MenuMainInit(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -459,7 +459,7 @@ void CYahooProto::MenuContactInit(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
mi.pszContactOwner = m_szModuleName;
|