summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/history.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-18 19:39:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-18 19:39:31 +0300
commit760347687945fcd50e46ebcefc666359258f8579 (patch)
tree449292b8d656bf0c51efbcebf19a74fde9d2b1ec /plugins/Popup/src/history.cpp
parent48e0d2824f79489e28b027d3e7affcc218817bba (diff)
m_ieview.h: code cleaning
Diffstat (limited to 'plugins/Popup/src/history.cpp')
-rw-r--r--plugins/Popup/src/history.cpp51
1 files changed, 14 insertions, 37 deletions
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp
index db4f52baa2..92afe9a947 100644
--- a/plugins/Popup/src/history.cpp
+++ b/plugins/Popup/src/history.cpp
@@ -168,39 +168,28 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
ieWindow.cy = rcLst.bottom - rcLst.top;
CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
- IEVIEWEVENTDATA ieData;
+ IEVIEWEVENTDATA ieData = {};
- IEVIEWEVENT ieEvent;
- ieEvent.cbSize = sizeof(ieEvent);
+ IEVIEWEVENT ieEvent = {};
ieEvent.iType = IEE_LOG_MEM_EVENTS;
- ieEvent.dwFlags = 0;
ieEvent.hwnd = hwndLog;
ieEvent.eventData = &ieData;
ieEvent.count = 1;
- ieEvent.codepage = 0;
- ieEvent.pszProto = nullptr;
for (auto &ppd : arPopupHistory) {
- ieData.cbSize = sizeof(ieData);
ieData.iType = IEED_EVENT_SYSTEM;
- ieData.dwFlags = 0;
ieData.color = ppd->colorText;
if (ppd->flags & PU2_UNICODE) {
- ieData.dwFlags |= IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK;
- ieData.pszNickW = ppd->szTitle.w;
- ieData.pszTextW = ppd->szText.w;
- ieData.pszText2W = nullptr;
+ ieData.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK;
+ ieData.szNick.w = ppd->szTitle.w;
+ ieData.szText.w = ppd->szText.w;
}
else {
- ieData.dwFlags |= 0;
- ieData.pszNick = ppd->szTitle.a;
- ieData.pszText = ppd->szText.a;
- ieData.pszText2 = nullptr;
+ ieData.dwFlags = 0;
+ ieData.szNick.a = ppd->szTitle.a;
+ ieData.szText.a = ppd->szText.a;
}
- ieData.bIsMe = FALSE;
ieData.time = ppd->dwTimestamp;
- ieData.dwData = 0;
- ieData.next = nullptr;
CallService(MS_HPP_EG_EVENT, 0, (WPARAM)&ieEvent);
}
}
@@ -353,38 +342,26 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
if (logType == LOG_HPP) {
POPUPDATA2 *ppd = (POPUPDATA2 *)lParam;
- IEVIEWEVENTDATA ieData;
+ IEVIEWEVENTDATA ieData = {};
- IEVIEWEVENT ieEvent;
- ieEvent.cbSize = sizeof(ieEvent);
+ IEVIEWEVENT ieEvent = {};
ieEvent.iType = IEE_LOG_MEM_EVENTS;
- ieEvent.dwFlags = 0;
ieEvent.hwnd = hwndLog;
ieEvent.eventData = &ieData;
ieEvent.count = 1;
- ieEvent.codepage = 0;
- ieEvent.pszProto = nullptr;
- ieData.cbSize = sizeof(ieData);
- ieData.dwFlags = 0;
ieData.iType = IEED_EVENT_SYSTEM;
ieData.color = ppd->colorText;
if (ppd->flags & PU2_UNICODE) {
ieData.dwFlags |= IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK;
- ieData.pszNickW = ppd->szTitle.w;
- ieData.pszTextW = ppd->szText.w;
- ieData.pszText2W = nullptr;
+ ieData.szNick.w = ppd->szTitle.w;
+ ieData.szText.w = ppd->szText.w;
}
else {
- ieData.dwFlags |= 0;
- ieData.pszNick = ppd->szTitle.a;
- ieData.pszText = ppd->szText.a;
- ieData.pszText2 = nullptr;
+ ieData.szNick.a = ppd->szTitle.a;
+ ieData.szText.a = ppd->szText.a;
}
- ieData.bIsMe = FALSE;
ieData.time = ppd->dwTimestamp;
- ieData.dwData = 0;
- ieData.next = nullptr;
CallService(MS_HPP_EG_EVENT, 0, (WPARAM)&ieEvent);
}
else if (logType == LOG_DEFAULT) {