From 33953cc6a0fab6a91af293c6838f8a46dd7922da Mon Sep 17 00:00:00 2001 From: George Hazan <george.hazan@gmail.com> Date: Mon, 10 Feb 2014 14:42:51 +0000 Subject: HCONTACT, part 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/message_pump.cpp | 18 ++++-------------- plugins/TipperYM/src/popwin.cpp | 6 +++--- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'plugins/TipperYM') diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index dd0ffc75d4..7bd6e7980b 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -156,19 +156,13 @@ unsigned int CALLBACK MessagePumpThread(void *param) HCONTACT hContact = (HCONTACT)hwndMsg.wParam; TCHAR *swzMsg = (TCHAR *)hwndMsg.lParam; - if (opt.bWaitForContent && - bStatusMsgReady == false && - clcitex && - clcitex->hItem == hContact) - { - if (WaitForContentTimerID) - { + if (opt.bWaitForContent && bStatusMsgReady == false && clcitex && clcitex->hItem == (HANDLE)hContact) { + if (WaitForContentTimerID) { KillTimer(0, WaitForContentTimerID); WaitForContentTimerID = 0; } - if (swzMsg) - { + if (swzMsg) { db_set_ts((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg); mir_free(swzMsg); } @@ -192,11 +186,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) case MUM_GOTAVATAR: { HCONTACT hContact = (HCONTACT)hwndMsg.wParam; - - if (opt.bWaitForContent && - bAvatarReady == false && - clcitex && - clcitex->hItem == hContact) + if (opt.bWaitForContent && bAvatarReady == false && clcitex && clcitex->hItem == (HANDLE)hContact) { if (WaitForContentTimerID) { diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index b9c3d80277..0a7cfa7dce 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -976,7 +976,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa break; case PUM_SETSTATUSTEXT: - if (pwd && (HANDLE)wParam == pwd->hContact) { + if (pwd && (HCONTACT)wParam == pwd->hContact) { db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR *)lParam); pwd->bIsPainted = false; pwd->bNeedRefresh = true; @@ -988,7 +988,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE; case PUM_SHOWXSTATUS: - if (pwd && (HANDLE)wParam == pwd->hContact) { + if (pwd && (HCONTACT)wParam == pwd->hContact) { // in case we have retrieve xstatus pwd->bIsPainted = false; SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0); @@ -997,7 +997,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE; case PUM_SETAVATAR: - if (pwd && (HANDLE)wParam == pwd->hContact) { + if (pwd && (HCONTACT)wParam == pwd->hContact) { pwd->bIsPainted = false; SendMessage(hwnd, PUM_GETHEIGHT, 0, 0); SendMessage(hwnd, PUM_CALCPOS, 0, 0); -- cgit v1.2.3