summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-21 14:34:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-21 14:34:07 +0300
commitc9b740a178828eae5cc4be7ab054e5f26d3a27e7 (patch)
treee15ce76cb41feb3375a76c95d861294b899bfe48 /plugins/NewXstatusNotify/src
parent6024e32d70da7a7c703de51e30b6c6407df8a745 (diff)
MessageWindowEventData: useless structure removed
Diffstat (limited to 'plugins/NewXstatusNotify/src')
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 7b32997456..9be1a1176e 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -506,25 +506,26 @@ void AddSMsgEventThread(void *arg)
mir_free(smi.newstatusmsg);
}
-int OnWindowEvent(WPARAM, LPARAM lParam)
+int OnWindowEvent(WPARAM uType, LPARAM lParam)
{
- MessageWindowEventData *mwed = (MessageWindowEventData *)lParam;
- if (mwed->uType == MSG_WINDOW_EVT_CLOSE) {
+ auto *pDlg = (CSrmmBaseDialog *)lParam;
+
+ if (uType == MSG_WINDOW_EVT_CLOSE) {
if (opt.XLogToDB && opt.XLogToDB_WinOpen && opt.XLogToDB_Remove)
- RemoveLoggedEventsXStatus(mwed->hContact);
+ RemoveLoggedEventsXStatus(pDlg->m_hContact);
if (opt.LogToDB && opt.LogToDB_WinOpen && opt.LogToDB_Remove)
- RemoveLoggedEventsStatus(mwed->hContact);
+ RemoveLoggedEventsStatus(pDlg->m_hContact);
if (opt.SMsgLogToDB && opt.SMsgLogToDB_WinOpen && opt.SMsgLogToDB_Remove)
- RemoveLoggedEventsSMsg(mwed->hContact);
+ RemoveLoggedEventsSMsg(pDlg->m_hContact);
}
- else if (mwed->uType == MSG_WINDOW_EVT_OPEN) {
- if (opt.XLogToDB && (templates.LogXFlags & NOTIFY_OPENING_ML) && g_plugin.getByte(mwed->hContact, "EnableXLogging", 1))
- mir_forkthread(AddXStatusEventThread, (void *)mwed->hContact);
+ else if (uType == MSG_WINDOW_EVT_OPEN) {
+ if (opt.XLogToDB && (templates.LogXFlags & NOTIFY_OPENING_ML) && g_plugin.getByte(pDlg->m_hContact, "EnableXLogging", 1))
+ mir_forkthread(AddXStatusEventThread, (void *)pDlg->m_hContact);
- if (opt.SMsgLogToDB && (templates.LogSMsgFlags & NOTIFY_OPENING_ML) && g_plugin.getByte(mwed->hContact, "EnableSMsgLogging", 1))
- mir_forkthread(AddSMsgEventThread, (void *)mwed->hContact);
+ if (opt.SMsgLogToDB && (templates.LogSMsgFlags & NOTIFY_OPENING_ML) && g_plugin.getByte(pDlg->m_hContact, "EnableSMsgLogging", 1))
+ mir_forkthread(AddSMsgEventThread, (void *)pDlg->m_hContact);
}
return 0;
}