summaryrefslogtreecommitdiff
path: root/protocols/MRA/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/MRA/src
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r--protocols/MRA/src/MraIcons.cpp3
-rw-r--r--protocols/MRA/src/Mra_functions.cpp10
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp3
3 files changed, 6 insertions, 10 deletions
diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp
index f24ffb42f3..be4790745f 100644
--- a/protocols/MRA/src/MraIcons.cpp
+++ b/protocols/MRA/src/MraIcons.cpp
@@ -168,8 +168,7 @@ void CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, HICON hMain
strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
pszServiceFunctionName = szServiceFunction + strlen(m_szModuleName);
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -1999901008;
HGENMENU (*fnAddFunc)(CLISTMENUITEM*);
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index eb6497f506..37e8e60f0c 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1144,11 +1144,10 @@ DWORD CMraProto::CreateBlobFromContact(HANDLE hContact, LPWSTR lpwszRequestReaso
void CMraProto::CListShowMenuItem(HANDLE hMenuItem, BOOL bShow)
{
- CLISTMENUITEM mi = {0};
-
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
- if (bShow == FALSE) mi.flags |= CMIF_HIDDEN;
+ if (bShow == FALSE)
+ mi.flags |= CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi);
}
@@ -1286,7 +1285,6 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP
WCHAR szBuff[STATUS_TITLE_MAX+STATUS_DESC_MAX];
size_t dwBuffSize;
WNDPROC OldMessageEditProc;
- CLISTMENUITEM mi = {0};
SetWindowLongPtr(hWndDlg, GWLP_USERDATA, (LONG_PTR)0);
@@ -1314,7 +1312,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP
dat->ppro->mraSetStringExW(NULL, szValueName, szBuff, dwBuffSize);
dat->ppro->mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, szBuff, dwBuffSize);
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = (CMIM_NAME|CMIF_UNICODE);
mi.ptszName = szBuff;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)dat->ppro->hXStatusMenuItems[dat->dwXStatus], (LPARAM)&mi);
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 46175c5bfc..d221ec848b 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -661,8 +661,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM wParam, LPARAM lParam)
WCHAR szItem[MAX_PATH+64], szStatusTitle[STATUS_TITLE_MAX+4];
mir_sntprintf(szItem, SIZEOF(szItem), L"%s Custom Status", m_tszUserName);
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 2000060000;
mi.popupPosition = 500085000;
mi.ptszPopupName = szItem;