summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Toaster/src/services.cpp22
-rw-r--r--plugins/Toaster/src/version.h2
2 files changed, 13 insertions, 11 deletions
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp
index fab8a4cd64..62b7596a72 100644
--- a/plugins/Toaster/src/services.cpp
+++ b/plugins/Toaster/src/services.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
__forceinline bool isChatRoom(MCONTACT hContact)
-{ return db_get_b(hContact, ptrA(GetContactProto(hContact)), "ChatRoom", 0);
+{ return (bool)db_get_b(hContact, ptrA(GetContactProto(hContact)), "ChatRoom", 0);
}
static void __cdecl OnToastNotificationClicked(void* arg)
@@ -17,9 +17,9 @@ static void __cdecl OnToastNotificationClicked(void* arg)
{
ptrA szProto(GetContactProto(hContact));
ptrT szChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
- GCDEST gcd = { szProto, szChatRoom, GC_EVENT_CONTROL };
- GCEVENT gce = { sizeof(gce), &gcd };
-
+ GCDEST gcd = { szProto, szChatRoom, GC_EVENT_CONTROL };
+ GCEVENT gce = { sizeof(gce), &gcd };
+
gcd.iType = GC_EVENT_CONTROL;
gce.time = time(NULL);
@@ -39,11 +39,15 @@ static void ShowToastNotification(TCHAR* text, TCHAR* title, MCONTACT hContact)
{
eventHandler = new ToastEventHandler(OnToastNotificationClicked, (void*)hContact);
- TCHAR avatarPath[MAX_PATH] = { 0 };
const char* szProto = GetContactProto(hContact);
- if (ProtoServiceExists(szProto, PS_GETMYAVATAR))
- if (!CallProtoService(szProto, PS_GETMYAVATAR, (WPARAM)avatarPath, (LPARAM)MAX_PATH))
- imagePath = mir_tstrdup(avatarPath);
+ PROTO_AVATAR_INFORMATION pai;
+ pai.hContact = hContact;
+ if (ProtoServiceExists(szProto, PS_GETAVATARINFO))
+ {
+
+ CallProtoService(szProto, PS_GETAVATARINFO, (WPARAM)0, (LPARAM)&pai);
+ imagePath = mir_tstrdup(pai.filename);
+ }
}
else
eventHandler = new ToastEventHandler(nullptr);
@@ -117,8 +121,6 @@ static INT_PTR PopupQuery(WPARAM wParam, LPARAM)
default:
return 1;
}
-
- return 0;
}
void InitServices()
diff --git a/plugins/Toaster/src/version.h b/plugins/Toaster/src/version.h
index 5b2f4a42f1..aea2503105 100644
--- a/plugins/Toaster/src/version.h
+++ b/plugins/Toaster/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
#define __RELEASE_NUM 0
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>