From 161c6d929c7effecbed5ca80876443889c06d2c1 Mon Sep 17 00:00:00 2001 From: sje Date: Fri, 3 Aug 2007 03:42:42 +0000 Subject: avatar fix (thx again borkra) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@321 4f64403b-2f21-0410-a795-97e2b3489a10 --- metacontacts/MetaContacts.mdsp | 2 +- metacontacts/MetaContacts.rc | 2 +- metacontacts/meta_services.c | 25 +++++++++++-------------- metacontacts/resource.h | 2 ++ metacontacts/version.h | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/metacontacts/MetaContacts.mdsp b/metacontacts/MetaContacts.mdsp index a99a807..5cc8303 100644 --- a/metacontacts/MetaContacts.mdsp +++ b/metacontacts/MetaContacts.mdsp @@ -99,4 +99,4 @@ extraResourceOptions= 1=resource.rc [Other] [History] -meta_options.c,24369 +meta_options.c,24359 diff --git a/metacontacts/MetaContacts.rc b/metacontacts/MetaContacts.rc index 35080c8..0c925da 100644 --- a/metacontacts/MetaContacts.rc +++ b/metacontacts/MetaContacts.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS diff --git a/metacontacts/meta_services.c b/metacontacts/meta_services.c index afc4ab5..88410ca 100644 --- a/metacontacts/meta_services.c +++ b/metacontacts/meta_services.c @@ -1768,28 +1768,25 @@ int Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) { } else { - HANDLE most_online; - //DBEVENTINFO dbei; + HANDLE hSub, hMeta; char szServiceName[100]; + int result; - most_online = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS); + hMeta = AI->hContact; + hSub = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS); - if(!most_online) + if(!hSub) return GAIR_NOAVATAR; - proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)most_online, 0); + proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hSub, 0); if(!proto) return GAIR_NOAVATAR; - //Meta_CopyContactNick(AI->hContact, most_online, proto); - - AI->hContact = most_online; + AI->hContact = hSub; - //Meta_SetNick(proto); - - _snprintf(szServiceName, sizeof(szServiceName), "%s%s", proto, PS_GETAVATARINFO); - if (ServiceExists(szServiceName)) { - return (int)(CallService(szServiceName, wParam, lParam)); - } + mir_snprintf(szServiceName, sizeof(szServiceName), "%s%s", proto, PS_GETAVATARINFO); + result = CallService(szServiceName, wParam, lParam); + AI->hContact = hMeta; + if (result != CALLSERVICE_NOTFOUND) return result; } return GAIR_NOAVATAR; // fail } diff --git a/metacontacts/resource.h b/metacontacts/resource.h index 0639c6d..9623dc2 100644 --- a/metacontacts/resource.h +++ b/metacontacts/resource.h @@ -64,6 +64,8 @@ #define IDC_BTN_RESET 1048 #define IDC_CMB_PROTOCOL 1062 +#define IDC_STATIC -1 + // Next default values for new objects // #ifdef APSTUDIO_INVOKED diff --git a/metacontacts/version.h b/metacontacts/version.h index 52bf15d..567c610 100644 --- a/metacontacts/version.h +++ b/metacontacts/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 14 #define __RELEASE_NUM 0 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3