Mercurial > pidgin.yaz
changeset 23524:ad565744246e
Add support for emblems in MSN protocol. Emblems include bots, mobile
users (not sure how this is different from current mobile
designation yet), web clients, and Yahoo buddies.
References #3385.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 15 Jun 2008 08:19:46 +0000 |
parents | 31b5a1334e7e |
children | ace1cd072e2f |
files | libpurple/protocols/msn/msn.c |
diffstat | 1 files changed, 25 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Sun Jun 15 08:08:22 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Jun 15 08:19:46 2008 +0000 @@ -591,6 +591,30 @@ return "msn"; } +static const char * +msn_list_emblems(PurpleBuddy *b) +{ + MsnUser *user = b->proto_data; + + if (user != NULL) { + if (user->clientid & MSN_CLIENT_CAP_BOT) + return "bot"; + if (user->clientid & MSN_CLIENT_CAP_WIN_MOBILE) + return "hiptop"; /* XXX: Rename to Mobile / Use different icon? */ +#if 0 + /* XXX: Since we don't support this, there's no point in showing it just yet */ + if (user->clientid & MSN_CLIENT_CAP_SCHANNEL) + return "secure"; +#endif + if (user->clientid & MSN_CLIENT_CAP_WEBMSGR) + return "web"; + if (user->networkid == MSN_NETWORK_YAHOO) + return "yahoo"; + } + + return NULL; +} + /* * Set the User status text */ @@ -2419,7 +2443,7 @@ NULL, /* protocol_options */ {"png", 0, 0, 96, 96, 0, PURPLE_ICON_SCALE_SEND}, /* icon_spec */ msn_list_icon, /* list_icon */ - NULL, /* list_emblems */ + msn_list_emblems, /* list_emblems */ msn_status_text, /* status_text */ msn_tooltip_text, /* tooltip_text */ msn_status_types, /* away_states */