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 /plugins/NewAwaySysMod | |
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 'plugins/NewAwaySysMod')
-rw-r--r-- | plugins/NewAwaySysMod/src/AwaySys.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 769ec125ae..e6c8f32234 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -290,9 +290,9 @@ static int IdleChangeEvent(WPARAM, LPARAM lParam) int PreBuildContactMenu(WPARAM hContact, LPARAM)
{
char *szProto = GetContactProto(hContact);
- CLISTMENUITEM miSetMsg = { sizeof(miSetMsg) };
+ CLISTMENUITEM miSetMsg = { 0 };
miSetMsg.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
- CLISTMENUITEM miReadMsg = { sizeof(miReadMsg) };
+ CLISTMENUITEM miReadMsg = { 0 };
miReadMsg.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
int iMode = szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : 0;
int Flag1 = szProto ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) : 0;
@@ -325,7 +325,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) // if this contact supports sending/receiving messages
if ((Flag1 & PF1_IM) == PF1_IM) {
int iAutoreply = CContactSettings(g_ProtoStates[szProto].Status, hContact).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_FLAGS | CMIF_TCHAR;
switch (iAutoreply) {
case VAL_USEDEFAULT: mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT)); break;
@@ -341,7 +341,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hAutoreplyUseDefaultContactMenuItem, (LPARAM)&mi);
}
else { // hide the Autoreply menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hToggleSOEContactMenuItem, (LPARAM)&mi);
}
@@ -383,7 +383,7 @@ INT_PTR ToggleSendOnEvent(WPARAM hContact, LPARAM) if (hContact == NULL) {
int SendOnEvent = CContactSettings(g_ProtoStates[(LPSTR)NULL].Status).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
if (SendOnEvent) {
mi.ptszName = ENABLE_SOE_COMMAND;
@@ -623,7 +623,7 @@ int MirandaLoaded(WPARAM, LPARAM) int SendOnEvent = CContactSettings(g_ProtoStates[(char*)NULL].Status).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.icolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
@@ -632,7 +632,6 @@ int MirandaLoaded(WPARAM, LPARAM) g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
mi.ptszName = LPGENT("Read status message"); // never seen...
@@ -641,7 +640,6 @@ int MirandaLoaded(WPARAM, LPARAM) if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
mi.ptszName = LPGENT("Set status message"); // will never be shown
mi.position = 1000020000;
@@ -650,7 +648,6 @@ int MirandaLoaded(WPARAM, LPARAM) g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP;
mi.hIcon = NULL;
mi.pszPopupName = (char*)-1;
|