summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-10 14:35:17 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-10 14:35:17 +0300
commit232ad59e407e92d4999b2cde32b1f849f3cbd3e1 (patch)
tree3d3ba32f40d9499e0c15dfa99167ec7b937cfbcf /protocols
parent2bcf1baac1eeac822c8f89210fe0300ab6371229 (diff)
code cleaning
Diffstat (limited to 'protocols')
-rw-r--r--protocols/YAMN/src/browser/mailbrowser.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp
index 24a2effdff..1cc60c42b7 100644
--- a/protocols/YAMN/src/browser/mailbrowser.cpp
+++ b/protocols/YAMN/src/browser/mailbrowser.cpp
@@ -466,9 +466,7 @@ int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nfla
NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT);
}
NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime;
-
NewMailPopup.PluginWindowProc = NewMailPopupProc;
- NewMailPopup.PluginData = nullptr; //it's new mail popup
for (HYAMNMAIL msgq = (HYAMNMAIL)ActualAccount->Mails; msgq != nullptr; msgq = msgq->Next, lfoundi++) {
// now we hide mail pointer to item's lParam member. We can later use it to retrieve mail datas
@@ -589,11 +587,8 @@ void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN,
g_plugin.setWString(ActualAccount->hContact, "Nick", tszMsg);
}
- if ((nflags & YAMN_ACC_POP) &&
- !(ActualAccount->Flags & YAMN_ACC_POPN) &&
- (MN->Real.PopupRun + MN->Virtual.PopupRun)) {
+ if ((nflags & YAMN_ACC_POP) && !(ActualAccount->Flags & YAMN_ACC_POPN) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) {
POPUPDATAW NewMailPopup;
-
NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount;
NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL);
if (nflags & YAMN_ACC_POPC) {
@@ -605,10 +600,7 @@ void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN,
NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT);
}
NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime;
-
NewMailPopup.PluginWindowProc = NewMailPopupProc;
- NewMailPopup.PluginData = (void *)nullptr; //multiple popups
-
mir_wstrncpy(NewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NewMailPopup.lpwzContactName));
mir_snwprintf(NewMailPopup.lpwzText, TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC);
PUAddPopupW(&NewMailPopup);
@@ -729,7 +721,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
MCONTACT hContact = 0;
CAccount *Account;
if (PluginParam) {
- YAMN_MAILSHOWPARAM *MailParam = new YAMN_MAILSHOWPARAM;
+ YAMN_MAILSHOWPARAM *MailParam = new YAMN_MAILSHOWPARAM();
memcpy(MailParam, (PINT_PTR)PluginParam, sizeof(YAMN_MAILSHOWPARAM));
hContact = MailParam->account->hContact;
Account = MailParam->account;