From 1925d3521846f4e6683d3d537cc41de9c9bd7250 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Feb 2014 19:01:03 +0000 Subject: "we don't need these variables" (c) Pink Floyd git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TooltipNotify/src/TooltipNotify.cpp | 30 +++++++++++------------------ 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'plugins/TooltipNotify') diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index daba6e6b4c..304833d981 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -154,25 +154,21 @@ int CTooltipNotify::ModulesLoaded(WPARAM wParam, LPARAM lParam) } -int CTooltipNotify::ProtoContactIsTyping(WPARAM wParam, LPARAM lParam) +int CTooltipNotify::ProtoContactIsTyping(WPARAM hContact, LPARAM lParam) { if (!m_sOptions.bTyping) return 0; - if (lParam>0) - { + if (lParam > 0) { STooltipData *pTooltipData = new STooltipData; pTooltipData->uiTimeout = lParam*1000; - pTooltipData->hContact = wParam; + pTooltipData->hContact = hContact; pTooltipData->iStatus = ID_TTNTF_STATUS_TYPING; EndNotifyAll(); SkinPlaySound(SND_TYPING); BeginNotify(pTooltipData); } - else - { - EndNotifyAll(); - } + else EndNotifyAll(); return 0; } @@ -208,11 +204,11 @@ int CTooltipNotify::ProtoAck(WPARAM wParam, LPARAM lParam) return 0; } -int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam) +int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = wParam; - if(hContact==NULL) return 0; + if (!hContact) + return 0; bool idle = false; if (lstrcmpA(cws->szSetting,"Status")==0) @@ -221,25 +217,21 @@ int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam) idle = true; else return 0; - if(db_get_b(hContact, "CList", "Hidden", 0)) return 0; + if(db_get_b(hContact, "CList", "Hidden", 0)) + return 0; const char *pszProto = cws->szModule; if (db_get_b(NULL, MODULENAME, pszProto, ProtoUserBit|ProtoIntBit) != (ProtoUserBit|ProtoIntBit)) - { return 0; - } if (db_get_b(hContact, "CList", "NotOnList", 0) && m_sOptions.bIgnoreUnknown) - { return 0; - } if (db_get_b(hContact, MODULENAME, CONTACT_IGNORE_TTNOTIFY, m_sOptions.bIgnoreNew)) - { return 0; - } - if (idle && !m_sOptions.bIdle) return 0; + if (idle && !m_sOptions.bIdle) + return 0; WORD wNewStatus = cws->value.wVal; switch(wNewStatus) -- cgit v1.2.3