diff libgaim/protocols/qq/utils.c @ 15071:902f3621aa13

[gaim-migrate @ 17855] Use the QQ faces as buddy icons instead of status icons. Also, a few minor cleanups and a bug fix for faces > 33. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Thu, 30 Nov 2006 10:30:13 +0000
parents c039c920e11c
children 2c93b0620065
line wrap: on
line diff
--- a/libgaim/protocols/qq/utils.c	Thu Nov 30 10:19:09 2006 +0000
+++ b/libgaim/protocols/qq/utils.c	Thu Nov 30 10:30:13 2006 +0000
@@ -159,13 +159,6 @@
 	return ip;
 }
 
-/* return the QQ icon file name
- * the return needs to be freed */
-gchar *get_icon_name(gint set)
-{
-	return g_strdup_printf("qq_%d", set);
-}
-
 /* convert Gaim name to original QQ UID */
 guint32 gaim_name_to_uid(const gchar *const name)
 {
@@ -337,3 +330,22 @@
 
 	return ret;
 }
+
+/* convert face num from packet (0-299) to local face (1-100) */
+gchar *face_to_icon_str(gint face)
+{
+	gchar *icon_num_str;
+	gint icon_num = face / 3 + 1;
+	icon_num_str = g_strdup_printf("%d", icon_num);
+	return icon_num_str;
+}
+
+/*
+gint face_to_icon_num(const gchar *face)
+{
+	gchar *icon_str = face_to_icon_str(face);
+	gint icon_num = strtol(icon_str, NULL, 10);
+	g_free(icon_str);
+	return icon_num;
+}
+*/