summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/services.cpp')
-rw-r--r--plugins/Toaster/src/services.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp
index 82c7572601..6bc3e1b8e4 100644
--- a/plugins/Toaster/src/services.cpp
+++ b/plugins/Toaster/src/services.cpp
@@ -13,35 +13,25 @@ void __stdcall ShowToastNotification(void* p)
return;
ptrW imagePath;
- if (td->hContact != NULL && td->hContact != INVALID_CONTACT_ID)
- {
- const char* szProto = GetContactProto(td->hContact);
- if (ProtoServiceExists(szProto, PS_GETAVATARINFO))
- {
+ if (td->hContact != NULL && td->hContact != INVALID_CONTACT_ID) {
+ const char *szProto = GetContactProto(td->hContact);
+ if (ProtoServiceExists(szProto, PS_GETAVATARINFO)) {
PROTO_AVATAR_INFORMATION pai = { td->hContact };
if (CallProtoService(szProto, PS_GETAVATARINFO, 0, (LPARAM)&pai) == GAIR_SUCCESS)
- {
imagePath = mir_wstrdup(pai.filename);
- }
}
- if (imagePath == NULL)
- {
- if (szProto) imagePath = ToasterImage(szProto);
- else
- {
+ if (imagePath == NULL) {
+ if (szProto)
+ imagePath = ToasterImage(szProto);
+ else {
if (td->iType == 1 && td->hBitmap) imagePath = ToasterImage(td->hBitmap);
else if (td->iType == 2 && td->hIcon) imagePath = ToasterImage(td->hIcon);
}
}
}
- else
- {
- if (td->hIcon)
- {
- imagePath = ToasterImage(td->hIcon);
- }
- }
+ else if (td->hIcon)
+ imagePath = ToasterImage(td->hIcon);
new (std::nothrow) ToastNotification(td->tszText, td->tszTitle, imagePath, td->hContact, td->pPopupProc, td->vPopupData);
}
@@ -175,7 +165,7 @@ void CleanupClasses()
static INT_PTR PopupQuery(WPARAM wParam, LPARAM)
{
- switch (wParam)
+ switch (wParam)
{
case PUQS_ENABLEPOPUPS:
{
@@ -259,4 +249,4 @@ void InitServices()
CreateServiceFunction(MS_POPUP_GETCONTACT, GetPopupContact);
CreateServiceFunction(MS_POPUP_DESTROYPOPUP, HideToast);
-} \ No newline at end of file
+}