summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 14:21:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 14:21:33 +0300
commiteccbb5307a048e70ac4adb0d3fd333be28245fa8 (patch)
treea9a2c92c13391a5cf288c9e0d841833c54f3cd5e /plugins/SmileyAdd
parent6a9e3738066370dac38f5f6768b8a6f61fe709e0 (diff)
massive cleanup of useless cbSize fields
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r--plugins/SmileyAdd/src/dlgboxsubclass.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
index 5fddca1ebe..9f8eab1afe 100644
--- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp
+++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
@@ -190,7 +190,7 @@ static int MsgDlgHook(WPARAM, LPARAM lParam)
const MessageWindowEventData *wndEvtData = (MessageWindowEventData*)lParam;
switch (wndEvtData->uType) {
case MSG_WINDOW_EVT_OPENING:
- if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) {
+ {
MsgWndData *msgwnd = new MsgWndData();
msgwnd->hwnd = wndEvtData->hwndWindow;
msgwnd->hContact = wndEvtData->hContact;
@@ -204,34 +204,31 @@ static int MsgDlgHook(WPARAM, LPARAM lParam)
mir_subclassWindow(msgwnd->hwnd, MessageDlgSubclass);
msgwnd->CreateSmileyButton();
- {
- mir_cslock lck(csWndList);
- g_MsgWndList.insert(msgwnd);
- }
- SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);
-
- if (wndEvtData->hwndLog)
- SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, false, false);
- if (wndEvtData->hwndInput)
- SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, false, false);
+ mir_cslock lck(csWndList);
+ g_MsgWndList.insert(msgwnd);
}
+
+ SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);
+
+ if (wndEvtData->hwndLog)
+ SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, false, false);
+ if (wndEvtData->hwndInput)
+ SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, false, false);
break;
case MSG_WINDOW_EVT_OPEN:
- if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) {
- SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);
- if (wndEvtData->hwndLog)
- SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, true, true);
- if (wndEvtData->hwndInput) {
- SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, true, true);
- SendMessage(wndEvtData->hwndInput, WM_REMAKERICH, 0, 0);
- }
+ SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);
+ if (wndEvtData->hwndLog)
+ SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, true, true);
+ if (wndEvtData->hwndInput) {
+ SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, true, true);
+ SendMessage(wndEvtData->hwndInput, WM_REMAKERICH, 0, 0);
}
break;
case MSG_WINDOW_EVT_CLOSE:
- if (wndEvtData->cbSize >= sizeof(MessageWindowEventData) && wndEvtData->hwndLog) {
+ if (wndEvtData->hwndLog) {
CloseRichCallback(wndEvtData->hwndLog);
CloseRichOwnerCallback(wndEvtData->hwndWindow);
}