diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/Toaster/src/services.cpp | 12 | ||||
| -rw-r--r-- | plugins/Toaster/src/stdafx.h | 3 | 
2 files changed, 8 insertions, 7 deletions
| diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp index 9063cf3113..d2d9148c66 100644 --- a/plugins/Toaster/src/services.cpp +++ b/plugins/Toaster/src/services.cpp @@ -55,13 +55,13 @@ void __stdcall ShowToastNotification(void* p)  		if (imagePath == NULL)
  		{
 -			if (szProto)
 +			if ((td->hIcon && td->bForcehIcon) || !szProto)
  			{
 -				imagePath = ProtoIcon(szProto);
 +				imagePath = SaveHIcon(td->hIcon, CMStringA(FORMAT, "%p", td->hIcon));
  			}
 -			else if (td->hIcon)
 +			else if (szProto)
  			{
 -				imagePath = SaveHIcon(td->hIcon, CMStringA(FORMAT, "%p", td->hIcon));
 +				imagePath = ProtoIcon(szProto);
  			}
  		}
  	}
 @@ -146,11 +146,11 @@ static INT_PTR CreateClassPopup(WPARAM, LPARAM lParam)  	{
  		if (it->second->iFlags & PCF_TCHAR)
  		{
 -			CallFunctionAsync(&ShowToastNotification, new ToastData(ppc->hContact, ppc->ptszTitle, ppc->ptszText, it->second->hIcon));
 +			CallFunctionAsync(&ShowToastNotification, new ToastData(ppc->hContact, ppc->ptszTitle, ppc->ptszText, it->second->hIcon, 1));
  		}
  		else
  		{
 -			CallFunctionAsync(&ShowToastNotification, new ToastData(ppc->hContact, mir_utf8decodeT(ppc->pszTitle), mir_utf8decodeT(ppc->pszText), it->second->hIcon));
 +			CallFunctionAsync(&ShowToastNotification, new ToastData(ppc->hContact, mir_utf8decodeT(ppc->pszTitle), mir_utf8decodeT(ppc->pszText), it->second->hIcon, 1));
  		}
  	}
 diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h index ca50132957..2e8a5bb94d 100644 --- a/plugins/Toaster/src/stdafx.h +++ b/plugins/Toaster/src/stdafx.h @@ -56,8 +56,9 @@ struct ToastData  	TCHAR *tszTitle;
  	TCHAR *tszText;
  	HICON hIcon;
 +	bool bForcehIcon;
 -	ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL) : hContact(_hContact), tszTitle(mir_tstrdup(_tszTitle)), tszText(mir_tstrdup(_tszText)), hIcon(_hIcon) {}
 +	ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL, bool b = false) : hContact(_hContact), tszTitle(mir_tstrdup(_tszTitle)), tszText(mir_tstrdup(_tszText)), hIcon(_hIcon), bForcehIcon(b) {}
  	~ToastData()
  	{
  		mir_free(tszTitle);
 | 
