summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/Alarms/src/alarmlist.cpp2
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/AvatarHistory/src/popup.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp8
-rw-r--r--plugins/BuddyExpectator/src/options.cpp3
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp36
-rw-r--r--plugins/ChangeKeyboardLayout/src/text_operations.cpp34
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/Misc.h2
-rw-r--r--plugins/CrashDumper/src/ui.cpp16
-rw-r--r--plugins/DbEditorPP/src/watchedvars.cpp2
-rw-r--r--plugins/Db_autobackups/src/backup.cpp2
-rw-r--r--plugins/Exchange/src/emails.cpp5
-rw-r--r--plugins/Exchange/src/utils.cpp2
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MirLua/src/utils.cpp2
-rw-r--r--plugins/MirOTR/src/utils.cpp2
-rw-r--r--plugins/MsgPopup/src/main.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Notification.cpp2
-rw-r--r--plugins/NewEventNotify/src/popup.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/NotifyAnything/src/main.cpp2
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp39
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp30
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp4
-rw-r--r--plugins/ProxySwitch/src/main.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_popups.cpp2
-rw-r--r--plugins/SeenPlugin/src/options.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp64
-rw-r--r--plugins/SmileyAdd/src/general.cpp10
-rw-r--r--plugins/Spamotron/src/popups.cpp104
-rw-r--r--plugins/SplashScreen/src/debug.h2
-rw-r--r--plugins/StartupSilence/src/main.cpp4
-rw-r--r--plugins/StatusManager/src/keepstatus.cpp2
-rw-r--r--plugins/StatusManager/src/ks_options.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp8
-rw-r--r--plugins/TranslitSwitcher/src/Layoutproc.cpp10
-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
-rw-r--r--plugins/WhenWasIt/src/notifiers.cpp58
-rw-r--r--plugins/WhenWasIt/src/services.cpp14
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp2
51 files changed, 292 insertions, 307 deletions
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index 1492a0f36b..f6d8d33b52 100755
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -615,7 +615,7 @@ void ShowPopup(ALARM *alarm)
memset(data, 0, sizeof(ALARM));
copy_alarm_data(data, alarm);
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchIcon = hIconMenuSet;
mir_wstrncpy(ppd.lpwzContactName, data->szTitle, MAX_CONTACTNAME);
mir_wstrncpy(ppd.lpwzText, data->szDesc, MAX_SECONDLINE);
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index 3985bd50fc..ae695c54a6 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -62,7 +62,7 @@ void ShowPopup(MCONTACT hContact, const wchar_t *msg)
{
wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact);
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIconList1;
mir_wstrncpy(ppd.lpwzContactName, lpzContactName, MAX_CONTACTNAME);
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index 29c33cfa7e..5639e96032 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -91,7 +91,7 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip
void *plugin_data, int type, const Options *op)
{
// Make popup
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = createProtoOverlayedIcon(hContact);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 46acde4e81..2f4226e18a 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -224,7 +224,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
if (options.hideInactive)
if (daysSinceMessage >= options.iSilencePeriod)
if (!db_get_b(hContact, "CList", "Hidden", 0) && !g_plugin.getByte(hContact, "NeverHide", 0)) {
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
@@ -259,7 +259,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
if (options.iShowPopup > 0) {
// Display Popup
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
@@ -296,7 +296,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message)
if (options.iShowPopup2 > 0) {
// Display Popup
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
@@ -477,7 +477,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam)
if (prevStatus == ID_STATUS_OFFLINE) {
if (g_plugin.getByte(hContact, "MissYou", 0)) {
// Display Popup
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index 96e2dd0856..a95abc0a5c 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -311,7 +311,6 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP
case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
POPUPDATAW ppd;
- memset(&ppd, 0, sizeof(ppd));
//iPopupDelay
options.iPopupDelay = GetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, nullptr, FALSE);
@@ -340,12 +339,10 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP
}
ppd.PluginData = nullptr;
ppd.iSeconds = options.iPopupDelay;
-
PUAddPopupW(&ppd, APF_NO_HISTORY);
wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
-
PUAddPopupW(&ppd, APF_NO_HISTORY);
}
else {
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp
index 257acb225f..ae4c7bc0b8 100644
--- a/plugins/ChangeKeyboardLayout/src/options.cpp
+++ b/plugins/ChangeKeyboardLayout/src/options.cpp
@@ -352,43 +352,43 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam,
if ((HIWORD(wParam) == BN_CLICKED )) {
ptszPopupPreviewText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t));
- POPUPDATAW pdtData = { 0 };
- wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
- wcsncpy(pdtData.lpwzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE);
+ POPUPDATAW ppd;
+ wcsncpy(ppd.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE);
switch(poOptionsTemp.bColourType) {
case PPC_POPUP:
- pdtData.colorBack = pdtData.colorText = 0;
+ ppd.colorBack = ppd.colorText = 0;
break;
case PPC_WINDOWS:
- pdtData.colorBack = GetSysColor(COLOR_BTNFACE);
- pdtData.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
break;
case PPC_CUSTOM:
- pdtData.colorBack = poOptionsTemp.crBackColour;
- pdtData.colorText = poOptionsTemp.crTextColour;
+ ppd.colorBack = poOptionsTemp.crBackColour;
+ ppd.colorText = poOptionsTemp.crTextColour;
break;
}
switch(poOptionsTemp.bTimeoutType) {
case PPT_POPUP:
- pdtData.iSeconds = 0;
+ ppd.iSeconds = 0;
break;
case PPT_PERMANENT:
- pdtData.iSeconds = -1;
+ ppd.iSeconds = -1;
break;
case PPC_CUSTOM:
- pdtData.iSeconds = poOptionsTemp.bTimeout;
+ ppd.iSeconds = poOptionsTemp.bTimeout;
break;
}
- mir_wstrcpy(ptszPopupPreviewText, pdtData.lpwzText);
- pdtData.PluginData = ptszPopupPreviewText;
- pdtData.lchIcon = hPopupIcon;
+ mir_wstrcpy(ptszPopupPreviewText, ppd.lpwzText);
+ ppd.PluginData = ptszPopupPreviewText;
+ ppd.lchIcon = hPopupIcon;
poOptions.paActions[0].lchIcon = hCopyIcon;
- pdtData.lpActions = poOptions.paActions;
- pdtData.actionCount = 1;
- pdtData.PluginWindowProc = (WNDPROC)CKLPopupDlgProc;
- if (PUAddPopupW(&pdtData) < 0)
+ ppd.lpActions = poOptions.paActions;
+ ppd.actionCount = 1;
+ ppd.PluginWindowProc = (WNDPROC)CKLPopupDlgProc;
+ if (PUAddPopupW(&ppd) < 0)
mir_free(ptszPopupPreviewText);
}
break;
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
index 094edd431f..dca4916e94 100644
--- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp
+++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
@@ -448,44 +448,44 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
LPTSTR ptszPopupText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t));
mir_wstrcpy(ptszPopupText, ptszMBox);
- POPUPDATAW pdtData = { 0 };
- wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
- wcsncpy(pdtData.lpwzText, ptszPopupText, MAX_SECONDLINE);
+ POPUPDATAW ppd;
+ wcsncpy(ppd.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
+ wcsncpy(ppd.lpwzText, ptszPopupText, MAX_SECONDLINE);
switch (poOptions.bColourType) {
case PPC_POPUP:
- pdtData.colorBack = pdtData.colorText = 0;
+ ppd.colorBack = ppd.colorText = 0;
break;
case PPC_WINDOWS:
- pdtData.colorBack = GetSysColor(COLOR_BTNFACE);
- pdtData.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
break;
case PPC_CUSTOM:
- pdtData.colorBack = poOptions.crBackColour;
- pdtData.colorText = poOptions.crTextColour;
+ ppd.colorBack = poOptions.crBackColour;
+ ppd.colorText = poOptions.crTextColour;
break;
}
switch (poOptions.bTimeoutType) {
case PPT_POPUP:
- pdtData.iSeconds = 0;
+ ppd.iSeconds = 0;
break;
case PPT_PERMANENT:
- pdtData.iSeconds = -1;
+ ppd.iSeconds = -1;
break;
case PPC_CUSTOM:
- pdtData.iSeconds = poOptions.bTimeout;
+ ppd.iSeconds = poOptions.bTimeout;
break;
}
- pdtData.PluginData = ptszPopupText;
- pdtData.PluginWindowProc = (WNDPROC)CKLPopupDlgProc;
+ ppd.PluginData = ptszPopupText;
+ ppd.PluginWindowProc = (WNDPROC)CKLPopupDlgProc;
- pdtData.lchIcon = hPopupIcon;
+ ppd.lchIcon = hPopupIcon;
poOptions.paActions[0].lchIcon = hCopyIcon;
- pdtData.lpActions = poOptions.paActions;
- pdtData.actionCount = 1;
+ ppd.lpActions = poOptions.paActions;
+ ppd.actionCount = 1;
- if (PUAddPopupW(&pdtData) < 0) {
+ if (PUAddPopupW(&ppd) < 0) {
mir_free(ptszPopupText);
MessageBox(nullptr, ptszMBox, TranslateT(MODULENAME), MB_ICONINFORMATION);
}
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 78186287cb..3774de9ca6 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -149,7 +149,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd)
}
PLUGIN_DATA *pdata = (PLUGIN_DATA*)calloc(1, sizeof(PLUGIN_DATA));
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = sd->hContact;
char *szProto = GetContactProto(sd->hContact);
pdata->hIcon = ppd.lchIcon = Finger_GetClientIcon(sd->MirVer, false);
diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h
index 4b08bf9dab..977871b0ff 100644
--- a/plugins/ClientChangeNotify/src/Misc.h
+++ b/plugins/ClientChangeNotify/src/Misc.h
@@ -23,7 +23,7 @@
__inline void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine = L"", bool IsErrorMsg = false, int Timeout = 0)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchIcon = LoadIcon(NULL, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION);
mir_wstrcpy(ppd.lpwzContactName, FirstLine);
mir_wstrcpy(ppd.lpwzText, SecondLine);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp
index 01e9c52a7d..67a73d1bb7 100644
--- a/plugins/CrashDumper/src/ui.cpp
+++ b/plugins/CrashDumper/src/ui.cpp
@@ -308,17 +308,17 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
void ShowMessage(int type, const wchar_t *format, ...)
{
- POPUPDATAW pi = {};
+ POPUPDATAW ppd;
va_list va;
va_start(va, format);
- int len = mir_vsnwprintf(pi.lpwzText, _countof(pi.lpwzText) - 1, format, va);
- pi.lpwzText[len] = 0;
+ int len = mir_vsnwprintf(ppd.lpwzText, _countof(ppd.lpwzText) - 1, format, va);
+ ppd.lpwzText[len] = 0;
va_end(va);
- mir_wstrcpy(pi.lpwzContactName, _A2W(MODULENAME));
- pi.lchIcon = LoadIconEx(IDI_VI);
- pi.PluginWindowProc = DlgProcPopup;
- pi.PluginData = (void*)type;
- PUAddPopupW(&pi);
+ mir_wstrcpy(ppd.lpwzContactName, _A2W(MODULENAME));
+ ppd.lchIcon = LoadIconEx(IDI_VI);
+ ppd.PluginWindowProc = DlgProcPopup;
+ ppd.PluginData = (void*)type;
+ PUAddPopupW(&ppd);
}
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp
index 333180ef33..f24dad1745 100644
--- a/plugins/DbEditorPP/src/watchedvars.cpp
+++ b/plugins/DbEditorPP/src/watchedvars.cpp
@@ -359,7 +359,7 @@ void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting)
int type = GetValue(hContact, module, setting, value, _countof(value));
mir_snwprintf(text, TranslateT("Database Setting Changed: \nModule: \"%s\", Setting: \"%s\"\nNew Value (%s): \"%s\""), _A2T(module), _A2T(setting), DBVType(type), value);
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = (MCONTACT)hContact;
ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(ICO_REGEDIT));
mir_wstrncpy(ppd.lpwzContactName, name, _countof(ppd.lpwzContactName));
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index 2d6eface9e..67722fbe0d 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -31,7 +31,7 @@ static void ShowPopup(const wchar_t *ptszText, wchar_t *ptszHeader, wchar_t *pts
if (g_plugin.bTerminated)
return;
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
wcsncpy_s(ppd.lpwzText, ptszText, _TRUNCATE);
wcsncpy_s(ppd.lpwzContactName, ptszHeader, _TRUNCATE);
if (ptszPath != nullptr)
diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp
index 93e5f1d19a..73b68242a4 100644
--- a/plugins/Exchange/src/emails.cpp
+++ b/plugins/Exchange/src/emails.cpp
@@ -303,10 +303,7 @@ int ShowMessage(wchar_t *message, int cUnreadEmails)
int ShowPopupMessage(wchar_t *title, wchar_t *message, int cUnreadEmails)
{
- POPUPDATAW popup = {0};
- popup.lchContact = NULL;
- popup.colorBack = NULL;
- popup.colorText = NULL;
+ POPUPDATAW popup;
popup.lchIcon = hiMailIcon;
wcsncpy_s(popup.lpwzContactName, MAX_CONTACTNAME, title, _TRUNCATE);
wcsncpy_s(popup.lpwzText, MAX_SECONDLINE, message, _TRUNCATE);
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp
index b5459483ef..a4f7efb340 100644
--- a/plugins/Exchange/src/utils.cpp
+++ b/plugins/Exchange/src/utils.cpp
@@ -220,7 +220,7 @@ int ThreadCheckEmail(int bForceAttempt)
void _popupUtil(wchar_t* szMsg)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchIcon = hiMailIcon;
wcsncpy(ppd.lpwzContactName, L"Exchange notifier", MAX_CONTACTNAME - 1);
wcsncpy(ppd.lpwzText, szMsg, MAX_SECONDLINE - 1);
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 1718722937..11d3939da6 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -96,7 +96,7 @@ void MakePopupMsg(HWND hDlg, MCONTACT hContact, wchar_t *msg)
HWND hFocused = GetForegroundWindow();
if (hDlg == hFocused || hDlg == GetParent(hFocused)) return;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SMALLICON));
mir_wstrcpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact));
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index a988fb13ef..0c355b9e1a 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -197,7 +197,7 @@ static void ShowPopup(const wchar_t *pwszText, MCONTACT hContact)
{
if (!pwszText) return;
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ppd.lchContact = hContact;
wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME - 1);
diff --git a/plugins/MirLua/src/utils.cpp b/plugins/MirLua/src/utils.cpp
index d5d7658f3c..f1ac61ae85 100644
--- a/plugins/MirLua/src/utils.cpp
+++ b/plugins/MirLua/src/utils.cpp
@@ -22,7 +22,7 @@ void ShowNotification(const char *caption, const char *message, int flags, MCONT
return;
if (Popup_Enabled()) {
- POPUPDATA ppd = { 0 };
+ POPUPDATA ppd;
ppd.lchContact = hContact;
mir_strncpy(ppd.lpzContactName, caption, MAX_CONTACTNAME);
mir_strncpy(ppd.lpzText, message, MAX_SECONDLINE);
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 53daeb5735..1d0e68f4f1 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -119,7 +119,7 @@ void ShowPopup(const wchar_t* line1, const wchar_t* line2, int timeout, const MC
if (Miranda_IsTerminated())
return;
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = nullptr;
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp
index c51aa1bb8a..810bb635bd 100644
--- a/plugins/MsgPopup/src/main.cpp
+++ b/plugins/MsgPopup/src/main.cpp
@@ -66,7 +66,7 @@ MSGBOXPROC prevMessageBox;
void popupMessage(LPCTSTR lpText, LPCTSTR lpCaption, UINT uType)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
int iIcon;
int indx;
diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp
index e76ab4fdb9..a3405f66fa 100644
--- a/plugins/NewAwaySysMod/src/Notification.cpp
+++ b/plugins/NewAwaySysMod/src/Notification.cpp
@@ -23,7 +23,7 @@
void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine, bool IsErrorMsg, int Timeout)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchIcon = LoadIcon(nullptr, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION);
mir_wstrncpy(ppd.lpwzContactName, FirstLine, MAX_CONTACTNAME);
mir_wstrncpy(ppd.lpwzText, SecondLine, MAX_SECONDLINE);
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index c556b04c41..0cc9bf7df2 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -325,7 +325,7 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
// check if we should report this kind of event
// get the prefered icon as well
// CHANGE: iSeconds is -1 because I use my timer to hide popup
- POPUPDATAW pudw;
+ POPUPDATAW pudw = {};
pudw.iSeconds = -1;
switch (eventType) {
@@ -378,7 +378,7 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
hContact = DbGetAuthEventContact(&dbe);
// set plugin_data ... will be usable within PopupDlgProc
- PLUGIN_DATA *pdata = (PLUGIN_DATA*)mir_alloc(sizeof(PLUGIN_DATA));
+ PLUGIN_DATA *pdata = (PLUGIN_DATA*)mir_calloc(sizeof(PLUGIN_DATA));
pdata->eventType = eventType;
pdata->hContact = hContact;
pdata->countEvent = 1;
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index 32c9758b01..db5724b5c6 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -23,7 +23,7 @@
void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
CMStringW buf(Clist_GetContactDisplayName(hContact));
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index f6bc0cbd79..7c3995e97e 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -480,7 +480,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
int showMessage(const popup_t &msg)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
wcsncpy(ppd.lpwzText, strip(msg.message).c_str(), MAX_SECONDLINE);
wcsncpy(ppd.lpwzContactName, msg.contact.c_str(), MAX_CONTACTNAME);
ppd.colorBack = msg.background;
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 72562fef04..ea2d553086 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -111,42 +111,41 @@ void show_popup(HWND hDlg, LPCTSTR pszTitle, LPCTSTR pszText, int iNumber, int A
if (!pmpd)
return;
- POPUPDATAW pd = { 0 };
- pd.lchContact = NULL; //(HANDLE)wParam;
- pd.lchIcon = Skin_LoadIcon(PopupsList[iNumber].Icon);
- mir_wstrncpy(pd.lpwzText, pszText, _countof(pd.lpwzText));
- mir_wstrncpy(pd.lpwzContactName, pszTitle, _countof(pd.lpwzContactName));
+ POPUPDATAW ppd;
+ ppd.lchIcon = Skin_LoadIcon(PopupsList[iNumber].Icon);
+ mir_wstrncpy(ppd.lpwzText, pszText, _countof(ppd.lpwzText));
+ mir_wstrncpy(ppd.lpwzContactName, pszTitle, _countof(ppd.lpwzContactName));
switch (MyOptions.DefColors) {
case byCOLOR_WINDOWS:
- pd.colorBack = GetSysColor(COLOR_BTNFACE);
- pd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
break;
case byCOLOR_OWN:
- pd.colorBack = PopupsList[iNumber].colorBack;
- pd.colorText = PopupsList[iNumber].colorText;
+ ppd.colorBack = PopupsList[iNumber].colorBack;
+ ppd.colorText = PopupsList[iNumber].colorText;
break;
case byCOLOR_POPUP:
- pd.colorBack = pd.colorText = 0;
+ ppd.colorBack = ppd.colorText = 0;
break;
}
if (iNumber == 0 && ActType != 0)
- pd.PluginWindowProc = (WNDPROC)PopupDlgProc;
+ ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
else
- pd.PluginWindowProc = (WNDPROC)PopupDlgProc2;
- pd.PluginData = pmpd;
+ ppd.PluginWindowProc = (WNDPROC)PopupDlgProc2;
+ ppd.PluginData = pmpd;
if (iNumber == 0)
- pd.iSeconds = -1;
+ ppd.iSeconds = -1;
else
- pd.iSeconds = MyOptions.Timeout;
- pd.hNotification = nullptr;
- pd.lpActions = pmpd->pa;
+ ppd.iSeconds = MyOptions.Timeout;
+ ppd.hNotification = nullptr;
+ ppd.lpActions = pmpd->pa;
pmpd->hDialog = hDlg;
if (ActType == 1) {
- MakePopupAction(pmpd->pa[pd.actionCount++], IDYES);
- MakePopupAction(pmpd->pa[pd.actionCount++], IDNO);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDYES);
+ MakePopupAction(pmpd->pa[ppd.actionCount++], IDNO);
}
- PUAddPopupW(&pd);
+ PUAddPopupW(&ppd);
}
INT_PTR CALLBACK DlgDownload(HWND hDlg, UINT message, WPARAM, LPARAM)
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index d18f409196..acf22fd26e 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -100,36 +100,36 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number)
mir_snprintf(setting, "Popups%d", Number);
if (g_plugin.getByte(setting, DEFAULT_POPUP_ENABLED)) {
- POPUPDATAW pd = { 0 };
- pd.lchContact = NULL;
- pd.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
+ POPUPDATAW ppd;
+ ppd.lchContact = NULL;
+ ppd.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
if (Number == POPUP_TYPE_MSG) {
- pd.PluginWindowProc = PopupDlgProcRestart;
- pd.iSeconds = -1;
+ ppd.PluginWindowProc = PopupDlgProcRestart;
+ ppd.iSeconds = -1;
}
else {
- pd.PluginWindowProc = PopupDlgProc;
- pd.iSeconds = PopupOptions.Timeout;
+ ppd.PluginWindowProc = PopupDlgProc;
+ ppd.iSeconds = PopupOptions.Timeout;
}
- lstrcpyn(pd.lpwzText, ptszText, MAX_SECONDLINE);
- lstrcpyn(pd.lpwzContactName, ptszTitle, MAX_CONTACTNAME);
+ lstrcpyn(ppd.lpwzText, ptszText, MAX_SECONDLINE);
+ lstrcpyn(ppd.lpwzContactName, ptszTitle, MAX_CONTACTNAME);
switch (PopupOptions.DefColors) {
case byCOLOR_WINDOWS:
- pd.colorBack = GetSysColor(COLOR_BTNFACE);
- pd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
break;
case byCOLOR_OWN:
- pd.colorBack = PopupsList[Number].colorBack;
- pd.colorText = PopupsList[Number].colorText;
+ ppd.colorBack = PopupsList[Number].colorBack;
+ ppd.colorText = PopupsList[Number].colorText;
break;
case byCOLOR_POPUP:
- pd.colorBack = pd.colorText = 0;
+ ppd.colorBack = ppd.colorText = 0;
break;
}
- PUAddPopupW(&pd);
+ PUAddPopupW(&ppd);
return;
}
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index c3b0ab1db1..6f255e4c9b 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -647,14 +647,14 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count, int additional)
m_actionCount = additional;
for (i = 0; i < count; ++i)
- if ((theActions[i].flags&PAF_ENABLED) && IsActionEnabled(&theActions[i]))
+ if ((theActions[i].flags & PAF_ENABLED) && IsActionEnabled(&theActions[i]))
++m_actionCount;
m_actions = new ActionInfo[m_actionCount];
int iAction = 0;
for (i = 0; i < count; ++i)
- if ((theActions[i].flags&PAF_ENABLED) && IsActionEnabled(&theActions[i])) {
+ if ((theActions[i].flags & PAF_ENABLED) && IsActionEnabled(&theActions[i])) {
m_actions[iAction].actionA = theActions[i];
++iAction;
}
diff --git a/plugins/ProxySwitch/src/main.cpp b/plugins/ProxySwitch/src/main.cpp
index 30a452c6a6..c79840bde7 100644
--- a/plugins/ProxySwitch/src/main.cpp
+++ b/plugins/ProxySwitch/src/main.cpp
@@ -72,7 +72,7 @@ void PopupMyIPAddrs(const wchar_t *msg)
{
OBJLIST<NETWORK_INTERFACE> list(10);
if (Create_NIF_List_Ex(&list) >= 0) {
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
wcsncpy_s(ppd.lpwzText, Print_NIF_List(list, msg), _TRUNCATE);
LoadSettings();
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp
index 98da4619ec..93891df7dd 100644
--- a/plugins/SecureIM/src/crypt_popups.cpp
+++ b/plugins/SecureIM/src/crypt_popups.cpp
@@ -36,7 +36,7 @@ void showPopup(LPCSTR lpzText, MCONTACT hContact, HICON hIcon, UINT type)
}
}
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIcon;
LPWSTR lpwzContactName = Clist_GetContactDisplayName(hContact);
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index 82abf159d9..2fb2bb6536 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -138,7 +138,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
else
idText = wparam + 20, idBack = wparam;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.colorBack = SendDlgItemMessage(hdlg, idBack, CPM_GETCOLOUR, 0, 0);
ppd.colorText = SendDlgItemMessage(hdlg, idText, CPM_GETCOLOUR, 0, 0);
DWORD temp = GetDWordFromColors(ppd.colorBack, ppd.colorText);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 934435e2d4..50ae378bb1 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -473,7 +473,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
mir_snprintf(szSetting, "Col_%d", newStatus - ID_STATUS_OFFLINE);
DWORD sett = g_plugin.getDword(szSetting, StatusColors15bits[newStatus - ID_STATUS_OFFLINE]);
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, sett);
ppd.lchContact = hcontact;
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 82a7c22ddb..b091904b06 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -499,35 +499,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;
}
}
@@ -537,45 +537,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/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp
index 7a1582daa3..9291389d6f 100644
--- a/plugins/SmileyAdd/src/general.cpp
+++ b/plugins/SmileyAdd/src/general.cpp
@@ -197,10 +197,10 @@ void ReportError(const wchar_t *errmsg)
{
static const wchar_t title[] = L"Miranda SmileyAdd";
- POPUPDATAW pd = { 0 };
- mir_wstrcpy(pd.lpwzContactName, title);
- mir_wstrcpy(pd.lpwzText, errmsg);
- pd.iSeconds = -1;
- if (PUAddPopupW(&pd) == INVALID_HANDLE_VALUE)
+ POPUPDATAW ppd;
+ mir_wstrcpy(ppd.lpwzContactName, title);
+ mir_wstrcpy(ppd.lpwzText, errmsg);
+ ppd.iSeconds = -1;
+ if (PUAddPopupW(&ppd) == INVALID_HANDLE_VALUE)
MessageBox(nullptr, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST);
}
diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp
index 305f0abf0c..c5cdcbe5f0 100644
--- a/plugins/Spamotron/src/popups.cpp
+++ b/plugins/Spamotron/src/popups.cpp
@@ -145,96 +145,96 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR
int ShowPopupPreview(HWND optDlg, BYTE popupType, wchar_t *line1, wchar_t *line2)
{
- POPUPDATAW ppdp = {0};
+ POPUPDATAW ppd;
switch (popupType)
{
case POPUP_DEFAULT:
- ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
- ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
+ ppd.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
+ ppd.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
break;
case POPUP_BLOCKED:
- ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_FOREGROUND,CPM_GETCOLOUR,0,0);
- ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_BACKGROUND,CPM_GETCOLOUR,0,0);
- ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_BLOCKED_TIMEOUT, nullptr, TRUE);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
+ ppd.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_FOREGROUND,CPM_GETCOLOUR,0,0);
+ ppd.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_BACKGROUND,CPM_GETCOLOUR,0,0);
+ ppd.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_BLOCKED_TIMEOUT, nullptr, TRUE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
break;
case POPUP_APPROVED:
- ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
- ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
- ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_APPROVED_TIMEOUT, nullptr, TRUE);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
+ ppd.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
+ ppd.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
+ ppd.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_APPROVED_TIMEOUT, nullptr, TRUE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
break;
case POPUP_CHALLENGE:
- ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_FOREGROUND,CPM_GETCOLOUR,0,0);
- ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_BACKGROUND,CPM_GETCOLOUR,0,0);
- ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT, nullptr, TRUE);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ ppd.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_FOREGROUND,CPM_GETCOLOUR,0,0);
+ ppd.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_BACKGROUND,CPM_GETCOLOUR,0,0);
+ ppd.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT, nullptr, TRUE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS)) {
- ppdp.colorText = GetSysColor(COLOR_WINDOWTEXT);
- ppdp.colorBack = GetSysColor(COLOR_WINDOW);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_WINDOW);
}
if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS)) {
- ppdp.colorText = NULL;
- ppdp.colorBack = NULL;
+ ppd.colorText = NULL;
+ ppd.colorBack = NULL;
}
- if (ppdp.iSeconds < 1)
- ppdp.iSeconds = -1;
+ if (ppd.iSeconds < 1)
+ ppd.iSeconds = -1;
if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT) || popupType == POPUP_DEFAULT)
- ppdp.iSeconds = 0;
+ ppd.iSeconds = 0;
- ppdp.lchContact = NULL;
- wcsncpy_s(ppdp.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE);
+ ppd.lchContact = NULL;
+ wcsncpy_s(ppd.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE);
if (line2)
- wcsncpy_s(ppdp.lpwzText, line2, _TRUNCATE);
- return (int)PUAddPopupW(&ppdp);
+ wcsncpy_s(ppd.lpwzText, line2, _TRUNCATE);
+ return (int)PUAddPopupW(&ppd);
}
int ShowPopup(MCONTACT hContact, BYTE popupType, wchar_t *line1, wchar_t *line2)
{
- POPUPDATAW ppdp = {0};
+ POPUPDATAW ppd;
switch (popupType)
{
case POPUP_DEFAULT:
- ppdp.colorText = g_plugin.getDword("PopupApprovedForeground", defaultPopupApprovedForeground);
- ppdp.colorBack = g_plugin.getDword("PopupApprovedBackground", defaultPopupApprovedBackground);
+ ppd.colorText = g_plugin.getDword("PopupApprovedForeground", defaultPopupApprovedForeground);
+ ppd.colorBack = g_plugin.getDword("PopupApprovedBackground", defaultPopupApprovedBackground);
break;
case POPUP_BLOCKED:
- ppdp.colorText = g_plugin.getDword("PopupBlockedForeground", defaultPopupBlockedForeground);
- ppdp.colorBack = g_plugin.getDword("PopupBlockedBackground", defaultPopupBlockedBackground);
- ppdp.iSeconds = g_plugin.getDword("PopupBlockedTimeout", defaultPopupBlockedTimeout);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
+ ppd.colorText = g_plugin.getDword("PopupBlockedForeground", defaultPopupBlockedForeground);
+ ppd.colorBack = g_plugin.getDword("PopupBlockedBackground", defaultPopupBlockedBackground);
+ ppd.iSeconds = g_plugin.getDword("PopupBlockedTimeout", defaultPopupBlockedTimeout);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
break;
case POPUP_APPROVED:
- ppdp.colorText = g_plugin.getDword("PopupApprovedForeground", defaultPopupApprovedForeground);
- ppdp.colorBack = g_plugin.getDword("PopupApprovedBackground", defaultPopupApprovedBackground);
- ppdp.iSeconds = g_plugin.getDword("PopupApprovedTimeout", defaultPopupApprovedTimeout);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
+ ppd.colorText = g_plugin.getDword("PopupApprovedForeground", defaultPopupApprovedForeground);
+ ppd.colorBack = g_plugin.getDword("PopupApprovedBackground", defaultPopupApprovedBackground);
+ ppd.iSeconds = g_plugin.getDword("PopupApprovedTimeout", defaultPopupApprovedTimeout);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
break;
case POPUP_CHALLENGE:
- ppdp.colorText = g_plugin.getDword("PopupChallengeForeground", defaultPopupChallengeForeground);
- ppdp.colorBack = g_plugin.getDword("PopupChallengeBackground", defaultPopupChallengeBackground);
- ppdp.iSeconds = g_plugin.getDword("PopupChallengeTimeout", defaultPopupChallengeTimeout);
- ppdp.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ ppd.colorText = g_plugin.getDword("PopupChallengeForeground", defaultPopupChallengeForeground);
+ ppd.colorBack = g_plugin.getDword("PopupChallengeBackground", defaultPopupChallengeBackground);
+ ppd.iSeconds = g_plugin.getDword("PopupChallengeTimeout", defaultPopupChallengeTimeout);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
if (g_plugin.getByte("PopupWindowsColors", defaultPopupWindowsColors)) {
- ppdp.colorText = GetSysColor(COLOR_WINDOWTEXT);
- ppdp.colorBack = GetSysColor(COLOR_WINDOW);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ ppd.colorBack = GetSysColor(COLOR_WINDOW);
}
if (g_plugin.getByte("PopupDefaultColors", defaultPopupDefaultColors)) {
- ppdp.colorText = NULL;
- ppdp.colorBack = NULL;
+ ppd.colorText = NULL;
+ ppd.colorBack = NULL;
}
- if (ppdp.iSeconds < 1)
- ppdp.iSeconds = -1;
+ if (ppd.iSeconds < 1)
+ ppd.iSeconds = -1;
if (g_plugin.getByte("PopupDefaultTimeout", defaultPopupDefaultTimeout) || popupType == POPUP_DEFAULT)
- ppdp.iSeconds = 0;
+ ppd.iSeconds = 0;
- ppdp.lchContact = hContact;
- wcsncpy_s(ppdp.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE);
+ ppd.lchContact = hContact;
+ wcsncpy_s(ppd.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE);
if (line2)
- wcsncpy_s(ppdp.lpwzText, line2, _TRUNCATE);
- return (int)PUAddPopupW(&ppdp);
+ wcsncpy_s(ppd.lpwzText, line2, _TRUNCATE);
+ return (int)PUAddPopupW(&ppd);
} \ No newline at end of file
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h
index 95b23d3af7..7faeda827c 100644
--- a/plugins/SplashScreen/src/debug.h
+++ b/plugins/SplashScreen/src/debug.h
@@ -20,7 +20,7 @@ int inline _DebugPopup(MCONTACT hContact, wchar_t *fmt, ...)
mir_snwprintf(debug, fmt, va);
if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) {
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index b2a0e9af05..e2f8ab22be 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -86,7 +86,7 @@ static void __cdecl AdvSt(void*)
Thread_SetName("StartupSilenc: AdvSt");
if ((Enabled == 1)) {
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
wchar_t *lpwzText = L"";
db_set_b(0, "Skin", "UseSound", 0);
Popup_Enable(true);
@@ -212,7 +212,7 @@ static INT_PTR StartupSilenceEnabled(WPARAM, LPARAM)
UpdateMenu();
if (PopUp == 1) {
wchar_t * lpwzText = Enabled == 1 ? S_MODE_CHANGEDON : S_MODE_CHANGEDOFF;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchIcon = IcoLib_GetIconByHandle((Enabled == 1) ? GetIconHandle(ENABLE_SILENCE) : GetIconHandle(DISABLE_SILENCE));
ppd.lchContact = NULL;
ppd.iSeconds = PopUpTime;
diff --git a/plugins/StatusManager/src/keepstatus.cpp b/plugins/StatusManager/src/keepstatus.cpp
index 0d9f74e08d..2356f77711 100644
--- a/plugins/StatusManager/src/keepstatus.cpp
+++ b/plugins/StatusManager/src/keepstatus.cpp
@@ -768,7 +768,7 @@ static VOID CALLBACK CheckContinueslyTimer(HWND, UINT, UINT_PTR, DWORD)
static INT_PTR ShowPopup(const wchar_t *msg, HICON hIcon)
{
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
ppd.lchIcon = hIcon;
wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME);
wcsncpy(ppd.lpwzText, msg, MAX_SECONDLINE);
diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/ks_options.cpp
index 18f0394b26..730ebbbd52 100644
--- a/plugins/StatusManager/src/ks_options.cpp
+++ b/plugins/StatusManager/src/ks_options.cpp
@@ -371,7 +371,7 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case IDC_PREV:
{
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME);
wcsncpy(ppd.lpwzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE);
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index 4066df9733..ca0c7955d4 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -86,7 +86,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, wchar_t*, COLORREF crBkg, const wchar_t* fmt, ...)
{
- POPUPDATAW pd = { 0 };
+ POPUPDATAW pd;
va_list marker;
static wchar_t szBuf[4 * 1024];
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 3f113e3632..0f0890098c 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -390,7 +390,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve
if (hEvent == 0 && hContact == 0)
dbe.szModule = Translate("Unknown module or contact");
- POPUPDATAW pud = { 0 };
+ POPUPDATAW pud;
long iSeconds;
switch (eventType) {
case EVENTTYPE_MESSAGE:
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 99724be8b3..757f7ba8ca 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -251,7 +251,7 @@ void CTabBaseDlg::NotifyDeliveryFailure() const
if (!Popup_Enabled())
return;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = m_hContact;
wcsncpy_s(ppd.lpwzContactName, m_cache->getNick(), _TRUNCATE);
wcsncpy_s(ppd.lpwzText, TranslateT("A message delivery has failed.\nClick to open the message window."), _TRUNCATE);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index cad78c179c..06ce68d9db 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -118,7 +118,7 @@ CSendLaterJob::~CSendLaterJob()
if (fShowPopup) {
wchar_t *tszName = Clist_GetContactDisplayName(hContact);
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = hContact;
wcsncpy_s(ppd.lpwzContactName, (tszName ? tszName : TranslateT("'(Unknown contact)'")), _TRUNCATE);
wchar_t *msgPreview = Utils::GetPreviewWithEllipsis(reinterpret_cast<wchar_t *>(&pBuf[mir_strlen((char *)pBuf) + 1]), 100);
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 55101e431b..f9a92d12fb 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -98,7 +98,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode)
}
int notyping;
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
if (iMode == PROTOTYPE_CONTACTTYPING_OFF) {
if (StopDisabled)
@@ -286,7 +286,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDC_PREVIEW:
for (int i = 0; i < 2; i++) {
- POPUPDATAW ppd = {};
+ POPUPDATAW ppd;
int notyping;
if (i == PROTOTYPE_CONTACTTYPING_OFF) {
wcsncpy_s(ppd.lpwzContactName, TranslateT("Contact"), _TRUNCATE);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 9fd318ab9b..b99ab58fb3 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -880,15 +880,11 @@ void UpdateNotifyTimer(void)
void NotifyOnSend(void)
{
POPUPDATAW ppd;
-
- memset(&ppd, 0, sizeof(ppd));
- ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
wcsncpy(ppd.lpwzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
mir_snwprintf(ppd.lpwzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
- ppd.PluginWindowProc = nullptr;
ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue);
PUAddPopupW(&ppd);
}
@@ -896,15 +892,11 @@ void NotifyOnSend(void)
void NotifyOnRecv(void)
{
POPUPDATAW ppd;
-
- memset(&ppd, 0, sizeof(ppd));
- ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
wcsncpy(ppd.lpwzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
mir_snwprintf(ppd.lpwzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
- ppd.PluginWindowProc = nullptr;
ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue);
PUAddPopupW(&ppd);
}
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp
index 2ddbc3202d..58b1600b3a 100644
--- a/plugins/TranslitSwitcher/src/Layoutproc.cpp
+++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp
@@ -429,11 +429,11 @@ void SwitchLayout(bool lastword)
if (smileyPrs != nullptr)
CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)smileyPrs);
- POPUPDATAW pd = { 0 };
- pd.lchIcon = IcoLib_GetIcon("Switch Layout and Send");
- mir_wstrncpy(pd.lpwzText, buf, _countof(pd.lpwzText));
- mir_wstrncpy(pd.lpwzContactName, TranslateW_LP(L"TranslitSwitcher"), _countof(pd.lpwzContactName));
- PUAddPopupW(&pd);
+ POPUPDATAW ppd;
+ ppd.lchIcon = IcoLib_GetIcon("Switch Layout and Send");
+ mir_wstrncpy(ppd.lpwzText, buf, _countof(ppd.lpwzText));
+ mir_wstrncpy(ppd.lpwzContactName, TranslateW_LP(L"TranslitSwitcher"), _countof(ppd.lpwzContactName));
+ PUAddPopupW(&ppd);
}
}
else if (mir_wstrcmpi(szClassName, L"RichEdit50W") == 0) {
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);
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp
index dfbf5d9d59..2f0f78c8ee 100644
--- a/plugins/WhenWasIt/src/notifiers.cpp
+++ b/plugins/WhenWasIt/src/notifiers.cpp
@@ -20,24 +20,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-void FillPopupData(POPUPDATAW &pd, int dtb)
+void FillPopupData(POPUPDATAW &ppd, int dtb)
{
int popupTimeout = (dtb == 0) ? commonData.popupTimeoutToday : commonData.popupTimeout;
- pd.colorBack = commonData.background;
- pd.colorText = commonData.foreground;
- pd.iSeconds = popupTimeout;
+ ppd.colorBack = commonData.background;
+ ppd.colorText = commonData.foreground;
+ ppd.iSeconds = popupTimeout;
}
void PopupNotifyNoBirthdays()
{
- POPUPDATAW pd = { 0 };
- FillPopupData(pd, -1);
- pd.lchIcon = GetDTBIcon(-1);
+ POPUPDATAW ppd;
+ FillPopupData(ppd, -1);
+ ppd.lchIcon = GetDTBIcon(-1);
- wcsncpy(pd.lpwzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1);
- wcsncpy(pd.lpwzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1);
- PUAddPopupW(&pd);
+ wcsncpy(ppd.lpwzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1);
+ wcsncpy(ppd.lpwzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1);
+ PUAddPopupW(&ppd);
}
wchar_t *BuildDTBText(int dtb, wchar_t *name, wchar_t *text, int size)
@@ -75,13 +75,13 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
BuildDTBText(dtb, name, text, _countof(text));
int gender = GetContactGender(hContact);
- POPUPDATAW pd = { 0 };
- FillPopupData(pd, dtb);
- pd.lchContact = hContact;
- pd.PluginWindowProc = DlgProcPopup;
- pd.lchIcon = GetDTBIcon(dtb);
+ POPUPDATAW ppd;
+ FillPopupData(ppd, dtb);
+ ppd.lchContact = hContact;
+ ppd.PluginWindowProc = DlgProcPopup;
+ ppd.lchIcon = GetDTBIcon(dtb);
- mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
+ mir_snwprintf(ppd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
wchar_t *sex;
switch (toupper(gender)) {
case 'M':
@@ -96,14 +96,14 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
}
if (age > 0) {
if (dtb > 0)
- mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age);
+ mir_snwprintf(ppd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age);
else
- mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_snwprintf(ppd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
}
else
- mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1);
+ mir_wstrncpy(ppd.lpwzText, text, MAX_SECONDLINE - 1);
- PUAddPopupW(&pd);
+ PUAddPopupW(&ppd);
return 0;
}
@@ -119,13 +119,13 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
BuildDABText(dab, name, text, _countof(text));
int gender = GetContactGender(hContact);
- POPUPDATAW pd = { 0 };
- FillPopupData(pd, dab);
- pd.lchContact = hContact;
- pd.PluginWindowProc = DlgProcPopup;
- pd.lchIcon = GetDTBIcon(dab);
+ POPUPDATAW ppd;
+ FillPopupData(ppd, dab);
+ ppd.lchContact = hContact;
+ ppd.PluginWindowProc = DlgProcPopup;
+ ppd.lchIcon = GetDTBIcon(dab);
- mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
+ mir_snwprintf(ppd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name);
wchar_t *sex;
switch (toupper(gender)) {
case 'M':
@@ -139,11 +139,11 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
break;
}
if (age > 0)
- mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
+ mir_snwprintf(ppd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age);
else
- mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1);
+ mir_wstrncpy(ppd.lpwzText, text, MAX_SECONDLINE - 1);
- PUAddPopupW(&pd);
+ PUAddPopupW(&ppd);
return 0;
}
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 3e5c89eee5..e0f459d225 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -156,13 +156,13 @@ INT_PTR AddBirthdayService(WPARAM hContact, LPARAM)
void ShowPopupMessage(const wchar_t *title, const wchar_t *message, HANDLE icon)
{
- POPUPDATAW pd = { 0 };
- pd.lchIcon = IcoLib_GetIconByHandle(icon);
- wcsncpy_s(pd.lpwzContactName, title, _TRUNCATE);
- wcsncpy_s(pd.lpwzText, message, _TRUNCATE);
- pd.colorText = commonData.foreground;
- pd.colorBack = commonData.background;
- PUAddPopupW(&pd);
+ POPUPDATAW ppd;
+ ppd.lchIcon = IcoLib_GetIconByHandle(icon);
+ wcsncpy_s(ppd.lpwzContactName, title, _TRUNCATE);
+ wcsncpy_s(ppd.lpwzText, message, _TRUNCATE);
+ ppd.colorText = commonData.foreground;
+ ppd.colorBack = commonData.background;
+ PUAddPopupW(&ppd);
}
void __cdecl RefreshUserDetailsWorkerThread(void*)
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index d1c15bafac..4183876a8c 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -129,7 +129,7 @@ void ShowWumfPopup(PWumf w)
void ShowThePopup(PWumf w, LPTSTR title, LPTSTR text)
{
- POPUPDATAW ppd = { 0 };
+ POPUPDATAW ppd;
ppd.lchContact = NULL;
ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_DRIVE));