diff options
-rw-r--r-- | protocols/YAMN/src/account.h | 1 | ||||
-rw-r--r-- | protocols/YAMN/src/browser/mailbrowser.cpp | 10 | ||||
-rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3comm.cpp | 8 |
3 files changed, 10 insertions, 9 deletions
diff --git a/protocols/YAMN/src/account.h b/protocols/YAMN/src/account.h index e7ae48d052..0e074e9dd2 100644 --- a/protocols/YAMN/src/account.h +++ b/protocols/YAMN/src/account.h @@ -40,7 +40,6 @@ enum ACC_DISCONNECTING, // disconnecting from server }; -#define YAMN_ACC_FORCEPOP 0x00000001 // Always show popup, cannot be stored #define YAMN_ACC_MSG 0x00000002 // Show dialog #define YAMN_ACC_ICO 0x00000004 // Show system tray icon (1) #define YAMN_ACC_ICOB 0x00000008 // not used now, enables tray icon flashing (1) diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp index 651320cad6..1c31cdbdc1 100644 --- a/protocols/YAMN/src/browser/mailbrowser.cpp +++ b/protocols/YAMN/src/browser/mailbrowser.cpp @@ -328,9 +328,7 @@ int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nn RunMailBrowser = FALSE;
// if some popups with mails are needed to show
- if (nflags & YAMN_ACC_FORCEPOP)
- RunPopups = TRUE;
- else if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (MN.Real.PopupNC + MN.Virtual.PopupNC))
+ if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (MN.Real.PopupNC + MN.Virtual.PopupNC))
RunPopups = TRUE;
else
RunPopups = FALSE;
@@ -416,7 +414,7 @@ int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nfla }
POPUPDATAW NewMailPopup = {};
- NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount;
+ NewMailPopup.lchContact = ActualAccount->hContact;
NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL);
if (nflags & YAMN_ACC_POPC) {
NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB;
@@ -550,7 +548,7 @@ void DoMailActions(HWND hDlg, CAccount *ActualAccount, CMailNumbers *MN, uint32_ 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.lchContact = ActualAccount->hContact;
NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL);
if (nflags & YAMN_ACC_POPC) {
NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB;
@@ -634,7 +632,7 @@ void DoMailActions(HWND hDlg, CAccount *ActualAccount, CMailNumbers *MN, uint32_ if ((nnflags & YAMN_ACC_POP) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) {
POPUPDATAW NoNewMailPopup = {};
- NoNewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount;
+ NoNewMailPopup.lchContact = ActualAccount->hContact;
NoNewMailPopup.lchIcon = g_plugin.getIcon(IDI_LAUNCHAPP);
if (nflags & YAMN_ACC_POPC) {
NoNewMailPopup.colorBack = ActualAccount->NoNewMailN.PopupB;
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp index f1c3918c2e..0bd8466233 100644 --- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp @@ -627,8 +627,12 @@ void MIR_CDECL SynchroPOP3(CheckParam *WhichTemp) }
YAMN_MAILBROWSERPARAM Param = { ActualAccount, NFlags, NNFlags, 0 };
- if (bForceCheck)
- Param.nnflags |= YAMN_ACC_FORCEPOP; // if force check, show popup anyway and if mailbrowser was opened, do not close
+
+ // if force check, show popup anyway and if mailbrowser was opened, do not close
+ if (bForceCheck) {
+ Param.nflags |= YAMN_ACC_POP;
+ Param.nnflags |= YAMN_ACC_POP;
+ }
Param.nnflags |= YAMN_ACC_MSGP; // do not close browser if already open
RunMailBrowser(&Param);
|