diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-02-11 19:01:03 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-02-11 19:01:03 +0000 | 
| commit | 1925d3521846f4e6683d3d537cc41de9c9bd7250 (patch) | |
| tree | 3f9bd6e5f557dc9eac040b078ededd5ee8e7870d /plugins/TooltipNotify/src | |
| parent | b63d67c92da0c420ee7c4f81b8ecdd3b8cfd132d (diff) | |
"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
Diffstat (limited to 'plugins/TooltipNotify/src')
| -rw-r--r-- | plugins/TooltipNotify/src/TooltipNotify.cpp | 30 | 
1 files changed, 11 insertions, 19 deletions
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)
  | 
