diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-21 14:34:07 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-21 14:34:07 +0300 |
commit | c9b740a178828eae5cc4be7ab054e5f26d3a27e7 (patch) | |
tree | e15ce76cb41feb3375a76c95d861294b899bfe48 /plugins/Sessions | |
parent | 6024e32d70da7a7c703de51e30b6c6407df8a745 (diff) |
MessageWindowEventData: useless structure removed
Diffstat (limited to 'plugins/Sessions')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 4489df8646..ad71d5306f 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -205,19 +205,20 @@ static void DelFromCurSession(MCONTACT hContact) }
}
-static int OnSrmmWindowEvent(WPARAM, LPARAM lParam)
+static int OnSrmmWindowEvent(WPARAM uType, LPARAM lParam)
{
- MessageWindowEventData *MWeventdata = (MessageWindowEventData*)lParam;
- if (MWeventdata->uType == MSG_WINDOW_EVT_OPEN) {
- AddToCurSession(MWeventdata->hContact);
+ auto *pDlg = (CSrmmBaseDialog *)lParam;
+
+ if (uType == MSG_WINDOW_EVT_OPEN) {
+ AddToCurSession(pDlg->m_hContact);
if (g_bCrashRecovery)
- g_plugin.setByte(MWeventdata->hContact, "wasInLastSession", 1);
+ g_plugin.setByte(pDlg->m_hContact, "wasInLastSession", 1);
}
- else if (MWeventdata->uType == MSG_WINDOW_EVT_CLOSE) {
+ else if (uType == MSG_WINDOW_EVT_CLOSE) {
if (!DONT)
- DelFromCurSession(MWeventdata->hContact);
+ DelFromCurSession(pDlg->m_hContact);
if (g_bCrashRecovery)
- g_plugin.setByte(MWeventdata->hContact, "wasInLastSession", 0);
+ g_plugin.setByte(pDlg->m_hContact, "wasInLastSession", 0);
}
return 0;
|