diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/main.cpp | 16 | ||||
-rw-r--r-- | src/modules/chat/tools.cpp | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 61be5168ad..fad58d97e2 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -229,17 +229,28 @@ static void OnSetTopic(SESSION_INFO *si) g_TabSession.ptszTopic = si->ptszTopic;
}
-static void OnFlashWindow(SESSION_INFO *si, int bInactive)
+static void OnFlashHighlight(SESSION_INFO *si, int bInactive)
{
if (!bInactive)
return;
-
+
if (!g_Settings.bTabsEnable && si->hWnd && g_Settings.bFlashWindowHighlight)
SetTimer(si->hWnd, TIMERID_FLASHWND, 900, NULL);
if (g_Settings.bTabsEnable && g_TabSession.hWnd)
SendMessage(g_TabSession.hWnd, GC_SETMESSAGEHIGHLIGHT, 0, (LPARAM)si);
}
+static void OnFlashWindow(SESSION_INFO *si, int bInactive)
+{
+ if (!bInactive)
+ return;
+
+ if (!g_Settings.bTabsEnable && si->hWnd && g_Settings.bFlashWindow)
+ SetTimer(si->hWnd, TIMERID_FLASHWND, 900, NULL);
+ if (g_Settings.bTabsEnable && g_TabSession.hWnd)
+ SendMessage(g_TabSession.hWnd, GC_SETTABHIGHLIGHT, 0, (LPARAM)si);
+}
+
static BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
{
if (gce->pDest->iType & g_Settings.dwTrayIconFlags)
@@ -349,6 +360,7 @@ extern "C" __declspec(dllexport) int Load(void) pci->OnLoadSettings = OnLoadSettings;
pci->OnSetStatusBar = OnSetStatusBar;
pci->OnFlashWindow = OnFlashWindow;
+ pci->OnFlashHighlight = OnFlashHighlight;
pci->ShowRoom = ShowRoom;
pci->DoPopup = DoPopup;
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index a553c4c916..5574f49e86 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -293,8 +293,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight ci.DoTrayIcon(si, gce);
if (bInactive || !g_Settings->bPopupInactiveOnly)
ci.DoPopup(si, gce);
- if (ci.OnFlashWindow)
- ci.OnFlashWindow(si, bInactive);
+ if (ci.OnFlashHighlight)
+ ci.OnFlashHighlight(si, bInactive);
return TRUE;
}
|