From 1a23578ffa4dd87cc024f362bd8b2fadfa087e23 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Mar 2017 20:46:09 +0300 Subject: group chats: - massive extinction of all remaining GC_* messages; - color chooser completely moved to mir_app; - color buttons' subclass function also moved to mir_app; - all code management transferred to a bunch of virtual functions, members of CChatRoomDlg; - numerous small fixes, like fix for a broken highlight in StdMsg --- plugins/Scriver/src/chat/main.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'plugins/Scriver/src/chat/main.cpp') diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 4a419ebde8..086b64c529 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -57,13 +57,13 @@ static void OnReplaceSession(SESSION_INFO *si) static void OnNewUser(SESSION_INFO *si, USERINFO*) { if (si->pDlg) - SendMessage(si->pDlg->GetHwnd(), GC_UPDATENICKLIST, 0, 0); + si->pDlg->UpdateNickList(); } static void OnSetStatus(SESSION_INFO *si, int) { if (si->pDlg) - PostMessage(si->pDlg->GetHwnd(), GC_FIXTABICONS, 0, 0); + si->pDlg->FixTabIcons(); } static void OnFlashHighlight(SESSION_INFO *si, int bInactive) @@ -73,7 +73,14 @@ static void OnFlashHighlight(SESSION_INFO *si, int bInactive) if (g_Settings.bFlashWindowHighlight) SendMessage(GetParent(si->pDlg->GetHwnd()), CM_STARTFLASHING, 0, 0); - SendMessage(si->pDlg->GetHwnd(), GC_SETMESSAGEHIGHLIGHT, 0, 0); + + si->wState |= GC_EVENT_HIGHLIGHT; + si->pDlg->FixTabIcons(); + si->pDlg->UpdateTitle(); + + HWND hwndParent = GetParent(si->pDlg->GetHwnd()); + if (g_Settings.bFlashWindowHighlight && GetActiveWindow() != si->pDlg->GetHwnd() && GetForegroundWindow() != hwndParent) + SendMessage(hwndParent, CM_STARTFLASHING, 0, 0); } static void OnFlashWindow(SESSION_INFO *si, int bInactive) @@ -83,7 +90,13 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive) if (g_Settings.bFlashWindow) SendMessage(GetParent(si->pDlg->GetHwnd()), CM_STARTFLASHING, 0, 0); - SendMessage(si->pDlg->GetHwnd(), GC_SETTABHIGHLIGHT, 0, 0); + + si->pDlg->FixTabIcons(); + si->pDlg->UpdateTitle(); + + HWND hwndParent = GetParent(si->pDlg->GetHwnd()); + if (g_Settings.bFlashWindow && GetActiveWindow() != hwndParent && GetForegroundWindow() != hwndParent) + SendMessage(hwndParent, CM_STARTFLASHING, 0, 0); } static void OnCreateModule(MODULEINFO *mi) -- cgit v1.2.3