diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-13 13:48:52 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-13 13:48:52 +0300 |
commit | 4a83b52c0affc137b1eccfb6201737bf455394fb (patch) | |
tree | 22cbcd672d5d0040f360803c274a3c89f887a000 /src/mir_app | |
parent | 691dc97a227dca40677e6b48b8b36ccba411bb0a (diff) |
offline file shall blink in tray & clist, but should raise SRMM instead of File Transfers Manager window
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/file.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mir_app/src/file.cpp b/src/mir_app/src/file.cpp index 9f3be80c8f..bbc689bf3a 100644 --- a/src/mir_app/src/file.cpp +++ b/src/mir_app/src/file.cpp @@ -366,7 +366,8 @@ MEVENT Proto_RecvFile(MCONTACT hContact, PROTORECVFILE *pre) blob.write(dbei); } - bool bShow = (pre->dwFlags & (PRFF_SILENT | PRFF_SENT)) == 0; + bool bSilent = (pre->dwFlags & PRFF_SILENT) != 0; + bool bSent = (pre->dwFlags & PRFF_SENT) != 0; MEVENT hdbe = db_event_add(hContact, &dbei); CLISTEVENT cle = {}; @@ -374,19 +375,19 @@ MEVENT Proto_RecvFile(MCONTACT hContact, PROTORECVFILE *pre) cle.hDbEvent = hdbe; cle.lParam = pre->lParam; - if (bShow && File::bAutoAccept && Contact::OnList(hContact)) + if (!bSent && !bSilent && File::bAutoAccept && Contact::OnList(hContact)) LaunchRecvDialog(&cle); else { Skin_PlaySound("RecvFile"); - if (bShow) { + if (!bSent) { wchar_t szTooltip[256]; mir_snwprintf(szTooltip, TranslateT("File from %s"), Clist_GetContactDisplayName(hContact)); - cle.szTooltip.w = szTooltip; + cle.szTooltip.w = szTooltip; cle.flags |= CLEF_UNICODE; cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE); - cle.pszService = "SRFile/RecvFile"; + cle.pszService = (bSilent) ? MS_MSG_READMESSAGE : "SRFile/RecvFile"; g_clistApi.pfnAddEvent(&cle); } } |