Mercurial > pidgin.yaz
diff libgaim/protocols/qq/buddy_status.c @ 14265:584cbd1628d0
[gaim-migrate @ 16947]
Added support for QQ faces. Thanks to csyfek@gmail.com for the images and protocol update.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Mon, 21 Aug 2006 07:17:40 +0000 |
parents | 60b1bc8dbf37 |
children | 437ce90442cf |
line wrap: on
line diff
--- a/libgaim/protocols/qq/buddy_status.c Mon Aug 21 06:06:54 2006 +0000 +++ b/libgaim/protocols/qq/buddy_status.c Mon Aug 21 07:17:40 2006 +0000 @@ -120,20 +120,22 @@ return FALSE; } -/* the icon suffix is detemined by status - * although QQ server may return the right icon, I set it here myself */ -gchar get_suffix_from_status(guint8 status) +/* The QQ client seems to use a separate icon for each + * face/status combo, but we only use one and let Gaim + * handle the rest. We need to use this function to report + * the correct icon file back to the server. */ +gint get_icon_offset_from_self_status(guint8 status) { switch (status) { - case QQ_BUDDY_ONLINE_NORMAL: - return QQ_ICON_SUFFIX_NORMAL; - case QQ_BUDDY_ONLINE_AWAY: - return QQ_ICON_SUFFIX_AWAY; - case QQ_BUDDY_ONLINE_INVISIBLE: - case QQ_BUDDY_ONLINE_OFFLINE: - return QQ_ICON_SUFFIX_OFFLINE; + case QQ_SELF_STATUS_AVAILABLE: + return 0; + case QQ_SELF_STATUS_AWAY: + case QQ_SELF_STATUS_CUSTOM: + return 1; + case QQ_SELF_STATUS_INVISIBLE: + return 2; default: - return QQ_ICON_SUFFIX_DEFAULT; + return 2; } }