summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight
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/HistorySweeperLight
parent6024e32d70da7a7c703de51e30b6c6407df8a745 (diff)
MessageWindowEventData: useless structure removed
Diffstat (limited to 'plugins/HistorySweeperLight')
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index 183b41be60..5ed98ea385 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -203,13 +203,14 @@ void ShutdownAction(void)
SweepHistoryFromContact(hContact, Criteria, TRUE); // sweep contact history, keepunread==1
}
-int OnWindowEvent(WPARAM, LPARAM lParam)
+int OnWindowEvent(WPARAM uType, LPARAM lParam)
{
- MessageWindowEventData *msgEvData = (MessageWindowEventData*)lParam;
- switch (msgEvData->uType) {
+ auto *pDlg = (CSrmmBaseDialog *)lParam;
+
+ switch (uType) {
case MSG_WINDOW_EVT_OPENING:
- g_hWindows.insert(PVOID(msgEvData->hContact));
- SetSrmmIcon(msgEvData->hContact);
+ g_hWindows.insert(PVOID(pDlg->m_hContact));
+ SetSrmmIcon(pDlg->m_hContact);
break;
case MSG_WINDOW_EVT_CLOSE:
@@ -219,11 +220,11 @@ int OnWindowEvent(WPARAM, LPARAM lParam)
Criteria.keep = KeepCriteria(g_plugin.getByte("StartupShutdownKeep"));
Criteria.time = BuildCriteria(g_plugin.getByte("StartupShutdownOlder"));
- SweepHistoryFromContact(msgEvData->hContact, Criteria, TRUE);
+ SweepHistoryFromContact(pDlg->m_hContact, Criteria, TRUE);
}
for (auto &it : g_hWindows.rev_iter())
- if (it == PVOID(msgEvData->hContact))
+ if (it == PVOID(pDlg->m_hContact))
g_hWindows.removeItem(&it);
break;
}