summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat/window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-10 21:46:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-10 21:47:09 +0300
commitb9a3a98d6f2695a36ca27fa2d88e99fedd72cc98 (patch)
treebeea931b224074701afadd5072db524d1b179219 /plugins/Scriver/src/chat/window.cpp
parentbdbb894df1353ba2f5e8eb61a59acf901fd652e5 (diff)
Group chats:
- GC_CONTROL_MSG left us forever; - tons of old/unused/useless slack simply wiped out; - new function: CSrmmBaseDialog::ClearLog
Diffstat (limited to 'plugins/Scriver/src/chat/window.cpp')
-rw-r--r--plugins/Scriver/src/chat/window.cpp62
1 files changed, 4 insertions, 58 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 7b88b9ddf5..0db9074563 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1378,7 +1378,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
else Log_StreamInEvent(m_si->pLogEnd, TRUE);
}
- else SendMessage(m_hwnd, GC_CONTROL_MSG, WINDOW_CLEARLOG, 0);
+ else ClearLog();
break;
case GC_REDRAWLOG2:
@@ -1391,7 +1391,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_si->pLogEnd)
Log_StreamInEvent(m_si->pLog, FALSE);
else
- SendMessage(m_hwnd, GC_CONTROL_MSG, WINDOW_CLEARLOG, 0);
+ ClearLog();
break;
case DM_UPDATETABCONTROL:
@@ -1541,60 +1541,6 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwnd, DM_UPDATETITLEBAR, 0, 0);
break;
- case GC_CONTROL_MSG:
- switch (wParam) {
- case SESSION_OFFLINE:
- SendMessage(m_hwnd, GC_UPDATESTATUSBAR, 0, 0);
- SendMessage(m_hwnd, GC_UPDATENICKLIST, 0, 0);
- return TRUE;
-
- case SESSION_ONLINE:
- SendMessage(m_hwnd, GC_UPDATESTATUSBAR, 0, 0);
- return TRUE;
-
- case WINDOW_HIDDEN:
- SendMessage(m_hwnd, GC_CLOSEWINDOW, 0, 0);
- return TRUE;
-
- case WINDOW_CLEARLOG:
- m_log.SetText(L"");
- return TRUE;
-
- case SESSION_TERMINATE:
- if (pcli->pfnGetEvent(m_hContact, 0))
- pcli->pfnRemoveEvent(m_hContact, GC_FAKE_EVENT);
- m_si->wState &= ~STATE_TALK;
- db_set_w(m_hContact, m_si->pszModule, "ApparentMode", 0);
- SendMessage(m_hwnd, GC_CLOSEWINDOW, 0, 0);
- return TRUE;
-
- case WINDOW_MINIMIZE:
- ShowWindow(m_hwnd, SW_MINIMIZE);
- goto LABEL_SHOWWINDOW;
-
- case WINDOW_MAXIMIZE:
- ShowWindow(m_hwnd, SW_MAXIMIZE);
- goto LABEL_SHOWWINDOW;
-
- case SESSION_INITDONE:
- if (db_get_b(0, CHAT_MODULE, "PopupOnJoin", 0) != 0)
- return TRUE;
- // fall through
- case WINDOW_VISIBLE:
- if (IsIconic(m_hwnd))
- ShowWindow(m_hwnd, SW_NORMAL);
- LABEL_SHOWWINDOW:
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
- SendMessage(m_hwnd, GC_REDRAWLOG, 0, 0);
- SendMessage(m_hwnd, GC_UPDATENICKLIST, 0, 0);
- SendMessage(m_hwnd, GC_UPDATESTATUSBAR, 0, 0);
- ShowWindow(m_hwnd, SW_SHOW);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
- SetForegroundWindow(m_hwnd);
- return TRUE;
- }
- break;
-
case GC_CHANGEFILTERFLAG:
m_iLogFilterFlags = lParam;
break;
@@ -1634,12 +1580,12 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- //fall through
+ // fall through
case WM_MOUSEACTIVATE:
if (uMsg != WM_ACTIVATE)
SetFocus(m_message.GetHwnd());
- pci->SetActiveSession(m_si->ptszID, m_si->pszModule);
+ pci->SetActiveSession(m_si);
if (db_get_w(m_hContact, m_si->pszModule, "ApparentMode", 0) != 0)
db_set_w(m_hContact, m_si->pszModule, "ApparentMode", 0);