From 5622e7729da483327a3e863ec51831e4cdaddf10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 16 Jun 2013 13:18:13 +0000 Subject: Fixed notifying events. git-svn-id: http://svn.miranda-ng.org/main/trunk@4981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_chat.h | 2 +- plugins/Scriver/src/chat/manager.cpp | 3 ++- plugins/Scriver/src/chat/services.cpp | 2 +- plugins/TabSRMM/src/chat/manager.cpp | 3 ++- plugins/TabSRMM/src/chat/services.cpp | 2 +- protocols/JabberG/src/jabber_groupchat.cpp | 3 ++- src/core/stdchat/src/manager.cpp | 3 ++- src/core/stdchat/src/services.cpp | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/m_chat.h b/include/m_chat.h index 3073b9b27f..4784745ffc 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -499,7 +499,7 @@ typedef struct { }; // IRC use it to display a hostmask for JOIN, PART (and more) events. BOOL bIsMe; // Is this event from the Miranda user? - DWORD dwFlags; // event flags: GCEF_ADDTOLOG, GC_UNICODE + DWORD dwFlags; // event flags: GCEF_ADDTOLOG, GCEF_NOTNOTIFY, GC_UNICODE // FALSE any other time than when initializing the window (before sending SESSION_INITDONE) DWORD_PTR dwItemData; // User specified data. diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp index 30dd1e849b..0c1a994cf1 100644 --- a/plugins/Scriver/src/chat/manager.cpp +++ b/plugins/Scriver/src/chat/manager.cpp @@ -296,7 +296,8 @@ BOOL SM_AddEventToAllMatchingUID(GCEVENT * gce) else if (pTemp->hWnd && pTemp->bInitDone) { SendMessage(pTemp->hWnd, GC_REDRAWLOG2, 0, 0); } - DoSoundsFlashPopupTrayStuff(pTemp, gce, FALSE, bManyFix); + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) + DoSoundsFlashPopupTrayStuff(pTemp, gce, FALSE, bManyFix); bManyFix ++; if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(pTemp, gce); diff --git a/plugins/Scriver/src/chat/services.cpp b/plugins/Scriver/src/chat/services.cpp index a90addd341..bfdc56b867 100644 --- a/plugins/Scriver/src/chat/services.cpp +++ b/plugins/Scriver/src/chat/services.cpp @@ -561,7 +561,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) else if (si->hWnd) SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); - if (!gce->dwFlags & GCEF_NOTNOTIFY) + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) DoSoundsFlashPopupTrayStuff(si, gce, bIsHighlighted, 0); if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(si, gce); diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 4b706059d9..88931e8b73 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -279,7 +279,8 @@ BOOL SM_AddEventToAllMatchingUID(GCEVENT * gce, BOOL bIsHighLight) } else if (pTemp->hWnd && pTemp->bInitDone) { SendMessage(pTemp->hWnd, GC_REDRAWLOG2, 0, 0); } - DoSoundsFlashPopupTrayStuff(pTemp, gce, bIsHighLight, bManyFix); + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) + DoSoundsFlashPopupTrayStuff(pTemp, gce, bIsHighLight, bManyFix); bManyFix ++; if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(pTemp, gce); diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 62cfb994f9..2c656a335b 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -767,7 +767,7 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) else if (si->hWnd) { SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); } - if (!gce->dwFlags & GCEF_NOTNOTIFY) + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) DoSoundsFlashPopupTrayStuff(si, gce, bIsHighlighted, 0); if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(si, gce); diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index dc7f1e3b8e..2255c2bcc0 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -1251,7 +1251,6 @@ void CJabberProto::GroupchatProcessMessage(HXML node) gce.ptszText = EscapeChatTags((TCHAR*)msgText); gce.bIsMe = nick == NULL ? FALSE : (lstrcmp(resource, item->nick) == 0); gce.dwFlags = GC_TCHAR; - CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce); if (!isHistory) gce.dwFlags |= GCEF_ADDTOLOG; @@ -1259,6 +1258,8 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (m_options.GcLogChatHistory && isHistory) gce.dwFlags |= GCEF_NOTNOTIFY; + CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce); + item->bChatActive = 2; if (gcd.iType == GC_EVENT_TOPIC) { diff --git a/src/core/stdchat/src/manager.cpp b/src/core/stdchat/src/manager.cpp index ac718a9452..a42b6f244a 100644 --- a/src/core/stdchat/src/manager.cpp +++ b/src/core/stdchat/src/manager.cpp @@ -294,7 +294,8 @@ BOOL SM_AddEventToAllMatchingUID(GCEVENT * gce) g_TabSession.pLogEnd = pTemp->pLogEnd; SendMessage(pTemp->hWnd, GC_REDRAWLOG2, 0, 0); } - DoSoundsFlashPopupTrayStuff(pTemp, gce, FALSE, bManyFix); + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) + DoSoundsFlashPopupTrayStuff(pTemp, gce, FALSE, bManyFix); bManyFix ++; if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(pTemp, gce); diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp index 883459bf10..620d3f254e 100644 --- a/src/core/stdchat/src/services.cpp +++ b/src/core/stdchat/src/services.cpp @@ -700,7 +700,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) g_TabSession.pLogEnd = si->pLogEnd; SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); } - if (!gce->dwFlags & GCEF_NOTNOTIFY) + if (!(gce->dwFlags & GCEF_NOTNOTIFY)) DoSoundsFlashPopupTrayStuff(si, gce, bIsHighlighted, 0); if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled) LogToFile(si, gce); -- cgit v1.2.3