From 4770a5e9184ded282139e66782afdd6d04010ee5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 13 Dec 2016 20:27:43 +0300 Subject: common chat code moved to the core --- plugins/Scriver/src/chat/main.cpp | 19 ------------------- plugins/Scriver/src/chat/window.cpp | 8 +------- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index b0379b0743..7e2ff29318 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -45,14 +45,6 @@ void LoadModuleIcons(MODULEINFO *mi) ImageList_Destroy(hList); } -static void OnAddLog(SESSION_INFO *si, int isOk) -{ - if (isOk && si->hWnd) - SendMessage(si->hWnd, GC_ADDLOG, 0, 0); - else if (si->hWnd) - SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); -} - static void OnDblClickSession(SESSION_INFO *si) { PostMessage(si->hWnd, GC_CLOSEWINDOW, 0, 0); @@ -76,14 +68,6 @@ static void OnReplaceSession(SESSION_INFO *si) RedrawWindow(GetDlgItem(si->hWnd, IDC_CHAT_LIST), NULL, NULL, RDW_INVALIDATE); } -static void OnEventBroadcast(SESSION_INFO *si, GCEVENT *gce) -{ - if (pci->SM_AddEvent(si->ptszID, si->pszModule, gce, FALSE) && si->hWnd && si->bInitDone) - SendMessage(si->hWnd, GC_ADDLOG, 0, 0); - else if (si->hWnd && si->bInitDone) - SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); -} - static void OnSetStatusBar(SESSION_INFO *si) { if (si->hWnd) @@ -164,14 +148,11 @@ int Chat_Load() pci->OnSetStatus = OnSetStatus; - pci->OnAddLog = OnAddLog; - pci->OnRemoveSession = OnRemoveSession; pci->OnRenameSession = OnRenameSession; pci->OnReplaceSession = OnReplaceSession; pci->OnDblClickSession = OnDblClickSession; - pci->OnEventBroadcast = OnEventBroadcast; pci->OnSetStatusBar = OnSetStatusBar; pci->OnFlashWindow = OnFlashWindow; pci->OnFlashHighlight = OnFlashHighlight; diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 8c503be2c7..f65ec5a5f5 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -903,7 +903,7 @@ static void __cdecl phase2(void *lParam) SESSION_INFO *si = (SESSION_INFO*)lParam; Sleep(30); if (si && si->hWnd) - PostMessage(si->hWnd, GC_REDRAWLOG3, 0, 0); + PostMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); } static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -1140,12 +1140,6 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE); break; - case GC_REDRAWLOG3: - si->LastTime = 0; - if (si->pLog) - Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE); - break; - case GC_ADDLOG: if (si->pLogEnd) Log_StreamInEvent(hwndDlg, si->pLog, si, FALSE); -- cgit v1.2.3