summaryrefslogtreecommitdiff
path: root/plugins/Toaster
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-03 10:07:07 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-03 10:07:07 +0000
commit41b18f5309e0ed67e7bd7f26f789aacdf9417f5d (patch)
tree7101650750fc162f9bc6a1c2b2b8b22734b12183 /plugins/Toaster
parent645809725d48605f0fa0d3a5f909667324be326a (diff)
Toaster: fixed classes icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@15164 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster')
-rw-r--r--plugins/Toaster/src/services.cpp12
-rw-r--r--plugins/Toaster/src/stdafx.h3
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);