summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-08 15:29:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-08 15:29:44 +0300
commit99962115431435cf17dfae4d3b7c8d7d55d824bf (patch)
tree1c80a533f5d3d4ba9d3b894a9a38b9167fe3047e /plugins/UserInfoEx/src
parenta23186175cff579d5aeb231372e87b0b852bdb38 (diff)
life is too short to remember whether this structure is zeroed or not
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp64
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp20
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp2
4 files changed, 44 insertions, 44 deletions
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 8e67dff833..80d049ec74 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -490,35 +490,35 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam)
MoveWindow(hDlg, -10, -10, 0, 0, FALSE);
LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA));
if (pmpd) {
- POPUPDATAW pd = { 0 };
- pd.lchContact = NULL; //(HANDLE)wParam;
+ POPUPDATAW ppd;
+ ppd.lchContact = NULL; //(HANDLE)wParam;
// icon
- pd.lchIcon = MsgLoadIcon(pMsgBox);
- mir_wstrncpy(pd.lpwzContactName, pMsgBox->ptszTitle, _countof(pd.lpwzContactName));
- mir_wstrncpy(pd.lpwzText, pMsgBox->ptszMsg, _countof(pd.lpwzText));
+ ppd.lchIcon = MsgLoadIcon(pMsgBox);
+ mir_wstrncpy(ppd.lpwzContactName, pMsgBox->ptszTitle, _countof(ppd.lpwzContactName));
+ mir_wstrncpy(ppd.lpwzText, pMsgBox->ptszMsg, _countof(ppd.lpwzText));
// CALLBAC Proc
- pd.PluginWindowProc = PopupProc;
- pd.PluginData = pmpd;
- pd.iSeconds = -1;
- pd.lpActions = pmpd->pa;
+ ppd.PluginWindowProc = PopupProc;
+ ppd.PluginData = pmpd;
+ ppd.iSeconds = -1;
+ ppd.lpActions = pmpd->pa;
// set color of popup
switch (pMsgBox->uType & MB_ICONMASK) {
case MB_ICON_ERROR:
- pd.colorBack = RGB(200, 10, 0);
- pd.colorText = RGB(255, 255, 255);
+ ppd.colorBack = RGB(200, 10, 0);
+ ppd.colorText = RGB(255, 255, 255);
break;
case MB_ICON_WARNING:
- pd.colorBack = RGB(200, 100, 0);
- pd.colorText = RGB(255, 255, 255);
+ ppd.colorBack = RGB(200, 100, 0);
+ ppd.colorText = RGB(255, 255, 255);
break;
default:
if (pMsgBox->uType & MB_CUSTOMCOLOR) {
- pd.colorBack = pMsgBox->colorBack;
- pd.colorText = pMsgBox->colorText;
+ ppd.colorBack = pMsgBox->colorBack;
+ ppd.colorText = pMsgBox->colorText;
}
}
@@ -528,45 +528,45 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam)
// active buttons
switch (MB_TYPE(pMsgBox->uType)) {
case MB_OK:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDOK);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDOK);
break;
case MB_OKCANCEL:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDOK);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDCANCEL);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDOK);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDCANCEL);
break;
case MB_RETRYCANCEL:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDRETRY);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDCANCEL);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDRETRY);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDCANCEL);
break;
case MB_YESNO:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDYES);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDNO);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDYES);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDNO);
break;
case MB_ABORTRETRYIGNORE:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDABORT);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDRETRY);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDIGNORE);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDABORT);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDRETRY);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDIGNORE);
break;
case MB_YESNOCANCEL:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDYES);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDNO);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDCANCEL);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDYES);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDNO);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDCANCEL);
break;
case MB_YESALLNO:
- MakePopupAction(pmpd->pa[pd.actionCount++], IDYES);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDALL);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDNO);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDYES);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDALL);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDNO);
break;
}
// create popup
- PUAddPopupW(&pd);
+ PUAddPopupW(&ppd);
if (MB_TYPE(pMsgBox->uType) == MB_OK)
EndDialog(hDlg, IDOK);
}
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index f173ec77c9..9d8d704089 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -882,7 +882,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
switch (LOWORD(wParam)) {
case BTN_PREVIEW:
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.iSeconds = (int)g_plugin.getByte(SET_POPUP_DELAY, 0);
mir_wstrncpy(ppd.lpwzText, TranslateT("This is the reminder message"), MAX_SECONDLINE);
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index 533989a1ab..a6204e6401 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -393,22 +393,22 @@ public:
**/
virtual HWND Create(LPCTSTR szTitle, PUpdCallback pFnCallBack)
{
- POPUPDATAW pd = { 0 };
- pd.lchIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
- pd.iSeconds = -1;
- pd.PluginData = this;
- pd.PluginWindowProc = CPopupUpdProgress::WndProc;
- pd.actionCount = _countof(_popupButtons);
- pd.lpActions = _popupButtons;
+ POPUPDATAW ppd;
+ ppd.lchIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
+ ppd.iSeconds = -1;
+ ppd.PluginData = this;
+ ppd.PluginWindowProc = CPopupUpdProgress::WndProc;
+ ppd.actionCount = _countof(_popupButtons);
+ ppd.lpActions = _popupButtons;
// dummy text
_szText = mir_wstrdup(szTitle);
- mir_wstrcpy(pd.lpwzContactName, _szText);
+ mir_wstrcpy(ppd.lpwzContactName, _szText);
- mir_wstrcpy(pd.lpwzText, L" ");
+ mir_wstrcpy(ppd.lpwzText, L" ");
_pFnCallBack = pFnCallBack;
- _hWnd = PUAddPopupW(&pd, APF_RETURN_HWND);
+ _hWnd = PUAddPopupW(&ppd, APF_RETURN_HWND);
return _hWnd;
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 7b9a57e0e0..6f6b207e52 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -249,7 +249,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT
if (!gRemindOpts.bPopups)
return 1;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.PluginWindowProc = PopupWindowProc;
ppd.iSeconds = (int)g_plugin.getByte(SET_POPUP_DELAY, 0);