diff options
author | George Hazan <ghazan@miranda.im> | 2020-09-17 20:38:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-09-17 20:38:05 +0300 |
commit | 73c1261a4fd2a7adfa496e054846c61167ce7fff (patch) | |
tree | edfd2f9f92f3a8bbe528ebc0e2628db91ee9c3c6 /src/mir_app | |
parent | 5d2c869e92a471e883990a0d18f4a1b37a5e10ad (diff) |
muted chat not to generate any sounds either
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat.h | 4 | ||||
-rw-r--r-- | src/mir_app/src/chat_manager.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/chat_tools.cpp | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h index edefe3af39..790bb5ec18 100644 --- a/src/mir_app/src/chat.h +++ b/src/mir_app/src/chat.h @@ -25,10 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_popup.h>
#include <m_fontservice.h>
-#define CHATMODE_NORMAL 0
-#define CHATMODE_MUTE 1
-#define CHATMODE_UNMUTE 2
-
void Srmm_CreateToolbarIcons(HWND hwndDlg, int flags);
void Srmm_ProcessToolbarHotkey(MCONTACT hContact, INT_PTR iButtonFrom, HWND hwndDlg);
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index 74b56fed8c..7456567452 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -78,7 +78,7 @@ static SESSION_INFO* GetActiveSession(void) // Log manager functions
// Necessary to keep track of events in a window log
-static LOGINFO *LM_AddEvent(LOGINFO **ppLogListStart, LOGINFO **ppLogListEnd)
+static LOGINFO* LM_AddEvent(LOGINFO **ppLogListStart, LOGINFO **ppLogListEnd)
{
if (!ppLogListStart || !ppLogListEnd)
return nullptr;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 424ead734e..682c176aeb 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -367,10 +367,11 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight BOOL bInactive = si->pDlg == nullptr || !si->pDlg->IsActive();
int iEvent = gce->iType;
+ bool bMute = db_get_b(si->hContact, "SRMM", "MuteMode", CHATMODE_NORMAL) == CHATMODE_MUTE;
if (bHighlight) {
gce->iType |= GC_EVENT_HIGHLIGHT;
- if (bInactive || !g_Settings->bSoundsFocus)
+ if (!bMute && (bInactive || !g_Settings->bSoundsFocus))
Skin_PlaySound("ChatHighlight");
if (Contact_IsHidden(si->hContact))
Contact_Hide(si->hContact, false);
@@ -419,7 +420,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight }
if (db_get_dw(0, CHAT_MODULE, "SoundFlags", GC_EVENT_HIGHLIGHT) & iEvent)
- if (szSound && (bInactive || !g_Settings->bSoundsFocus))
+ if (!bMute && szSound && (bInactive || !g_Settings->bSoundsFocus))
Skin_PlaySound(szSound);
}
|