summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-19 08:56:43 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-19 08:56:43 +0000
commite866f23fb250ef42e795c660f9769a3c2a62db62 (patch)
tree3c22f03921e272a0b1cb87dd6a4b2a3e01c5a30e /plugins
parentce7f2837be73bf8d75a64205f5fae7fd62e772cf (diff)
Toaster: fixed avatars; warning fixes; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@14993 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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>