diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/IcqOscarJ/src/icq_xstatus.cpp | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (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/IcqOscarJ/src/icq_xstatus.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_xstatus.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index f5b659d867..89b530e607 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -789,12 +789,10 @@ static INT_PTR CALLBACK SetXStatusDlgProc(HWND hwndDlg,UINT message,WPARAM wPara void CIcqProto::setXStatusEx(BYTE bXStatus, BYTE bQuiet)
{
- CLISTMENUITEM mi = {0};
BYTE bOldXStatus = getSettingByte(NULL, DBSETTING_XSTATUS_ID, 0);
- mi.cbSize = sizeof(mi);
-
if (!m_bHideXStatusUI) {
+ CLISTMENUITEM mi = { sizeof(mi) };
if (bOldXStatus <= XSTATUS_COUNT) {
mi.flags = CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hXStatusItems[bOldXStatus], (LPARAM)&mi);
@@ -854,8 +852,7 @@ INT_PTR CIcqProto::menuXStatus(WPARAM wParam,LPARAM lParam,LPARAM fParam) void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
{
- CLISTMENUITEM mi;
- int i = 0, len = strlennull(m_szModuleName);
+ int len = strlennull(m_szModuleName);
char srvFce[MAX_PATH + 64];
char szItem[MAX_PATH + 64];
int bXStatusMenuBuilt = 0;
@@ -873,12 +870,13 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) return;
null_snprintf(szItem, sizeof(szItem), Translate("%s Custom Status"), m_szModuleName);
- mi.cbSize = sizeof(mi);
+
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.pszPopupName = szItem;
mi.popupPosition = 500084000;
mi.position = 2000040000;
- for (i = 0; i <= XSTATUS_COUNT; i++) {
+ for (int i = 0; i <= XSTATUS_COUNT; i++) {
null_snprintf(srvFce, sizeof(srvFce), "%s/menuXStatus%d", m_szModuleName, i);
mi.position++;
|