summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-25 14:24:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-25 14:24:53 +0300
commit9cca190bc3022311915eb1e95b3cc3bb89aed328 (patch)
treef0e27680e6dae1a0df044ae59ad86ccac59d0db7 /src/mir_app
parentcf83f17e172253faf44737b8f4c27945e9f671e5 (diff)
massive code cleaning:
- GCHOOK structure normalized (i.e. inlined SESSION_INFO fields replaced with a reference to SESSION_INFO); - fake CMsgDialog declaration added to m_srmm_int.h, thus duplicated declarations in plugins aren't needed anymore - other minor changes
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat.h7
-rw-r--r--src/mir_app/src/chat_tools.cpp5
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/srmm_base.cpp2
5 files changed, 6 insertions, 10 deletions
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 3cc64078fe..4685fa5685 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -30,13 +30,6 @@ void Srmm_ProcessToolbarHotkey(MCONTACT hContact, INT_PTR iButtonFrom, HWND hwnd
class CLogWindow : public CSrmmLogWindow {};
-class CMsgDialog : public CSrmmBaseDialog
-{
- friend void RedrawLog2(SESSION_INFO *si);
-
- CMsgDialog(); // just to suppress compiler's warnings, never implemented
-};
-
extern HGENMENU hJoinMenuItem, hLeaveMenuItem;
extern HPLUGIN g_pChatPlugin;
extern GlobalLogSettingsBase *g_Settings;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 5a18edbe4f..9a514bb6cd 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -558,7 +558,9 @@ MIR_APP_DLL(BOOL) Chat_DoEventHook(SESSION_INFO *si, int iType, const USERINFO *
if (si == nullptr)
return FALSE;
- GCHOOK gch = { si->pszModule, si->ptszID, iType };
+ GCHOOK gch = {};
+ gch.iType = iType;
+ gch.si = si;
if (pUser != nullptr) {
gch.ptszUID = pUser->pszUID;
gch.ptszNick = pUser->pszNick;
@@ -567,7 +569,6 @@ MIR_APP_DLL(BOOL) Chat_DoEventHook(SESSION_INFO *si, int iType, const USERINFO *
gch.ptszText = (LPTSTR)pszText;
gch.dwData = dwItem;
- gch.pDlg = si->pDlg;
NotifyEventHooks(hevSendEvent, 0, (WPARAM)&gch);
return TRUE;
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 4a92f525a5..bc8f8229f5 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -720,3 +720,4 @@ _UnregisterSrmmLog@4 @806 NONAME
_WebSocket_Send@12 @808 NONAME
_WebSocket_InitHeader@12 @809 NONAME
_WebSocket_Connect@12 @810 NONAME
+?log@CSrmmBaseDialog@@QBEPAVCSrmmLogWindow@@XZ @811 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 447cc83c99..b952ccb7ef 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -720,3 +720,4 @@ UnregisterSrmmLog @806 NONAME
WebSocket_Send @808 NONAME
WebSocket_InitHeader @809 NONAME
WebSocket_Connect @810 NONAME
+?log@CSrmmBaseDialog@@QEBAPEAVCSrmmLogWindow@@XZ @811 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 569b3eb5d8..4ee3aa3318 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -557,7 +557,7 @@ void RedrawLog2(SESSION_INFO *si)
{
si->LastTime = 0;
if (si->pLog)
- si->pDlg->m_pLog->LogEvents(si->pLogEnd, TRUE);
+ si->pDlg->log()->LogEvents(si->pLogEnd, TRUE);
}
static void __cdecl phase2(SESSION_INFO *si)