summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat.h4
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_tools.cpp5
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);
}