comparison libpurple/protocols/qq/buddy_info.c @ 24873:0d7c21b5f1d7

propagate from branch 'im.pidgin.pidgin' (head c06356e8e8d2c586f0192a5564053c2584020da8) to branch 'im.pidgin.pidgin.openq' (head a7077bc12b850d60ea7d768f4b9d4ee6ae6ad2c1)
author SHiNE CsyFeK <csyfek@gmail.com>
date Thu, 25 Dec 2008 14:06:10 +0000
parents 68eba2bafa6f 370fd1834371
children effbf24b39b1 43b721aa4b76
comparison
equal deleted inserted replaced
24658:68eba2bafa6f 24873:0d7c21b5f1d7
56 "-", "A", "B", "O", "AB", N_("Other") 56 "-", "A", "B", "O", "AB", N_("Other")
57 }; 57 };
58 58
59 #define QQ_PUBLISH_SIZE 3 59 #define QQ_PUBLISH_SIZE 3
60 static const gchar *publish_types[] = { 60 static const gchar *publish_types[] = {
61 N_("Visible"), N_("Firend Only"), N_("Private") 61 N_("Visible"), N_("Friend Only"), N_("Private")
62 }; 62 };
63 63
64 #define QQ_GENDER_SIZE 3 64 #define QQ_GENDER_SIZE 3
65 static const gchar *genders[] = { 65 static const gchar *genders[] = {
66 N_("Private"), 66 N_("Private"),
85 QQ_INFO_OCCU, QQ_INFO_HOME_PAGE, QQ_INFO_AUTH_TYPE, QQ_INFO_UNKNOW1, QQ_INFO_UNKNOW2, 85 QQ_INFO_OCCU, QQ_INFO_HOME_PAGE, QQ_INFO_AUTH_TYPE, QQ_INFO_UNKNOW1, QQ_INFO_UNKNOW2,
86 QQ_INFO_FACE, QQ_INFO_MOBILE, QQ_INFO_MOBILE_TYPE, QQ_INFO_INTRO, QQ_INFO_CITY, 86 QQ_INFO_FACE, QQ_INFO_MOBILE, QQ_INFO_MOBILE_TYPE, QQ_INFO_INTRO, QQ_INFO_CITY,
87 QQ_INFO_UNKNOW3, QQ_INFO_UNKNOW4, QQ_INFO_UNKNOW5, 87 QQ_INFO_UNKNOW3, QQ_INFO_UNKNOW4, QQ_INFO_UNKNOW5,
88 QQ_INFO_IS_PUB_MOBILE, QQ_INFO_IS_PUB_CONTACT, QQ_INFO_COLLEGE, QQ_INFO_HOROSCOPE, 88 QQ_INFO_IS_PUB_MOBILE, QQ_INFO_IS_PUB_CONTACT, QQ_INFO_COLLEGE, QQ_INFO_HOROSCOPE,
89 QQ_INFO_ZODIAC, QQ_INFO_BLOOD, QQ_INFO_SHOW, QQ_INFO_UNKNOW6, 89 QQ_INFO_ZODIAC, QQ_INFO_BLOOD, QQ_INFO_SHOW, QQ_INFO_UNKNOW6,
90 QQ_INFO_LAST_2007, QQ_INFO_LAST, 90 QQ_INFO_LAST_2007, QQ_INFO_LAST
91 }; 91 };
92 92
93 enum { 93 enum {
94 QQ_FIELD_UNUSED = 0, QQ_FIELD_BASE, QQ_FIELD_EXT, QQ_FIELD_CONTACT, QQ_FIELD_ADDR 94 QQ_FIELD_UNUSED = 0, QQ_FIELD_BASE, QQ_FIELD_EXT, QQ_FIELD_CONTACT, QQ_FIELD_ADDR
95 }; 95 };
96 96
97 enum { 97 enum {
98 QQ_FIELD_LABEL = 0, QQ_FIELD_STRING, QQ_FIELD_MULTI, QQ_FIELD_BOOL, QQ_FIELD_CHOICE, 98 QQ_FIELD_LABEL = 0, QQ_FIELD_STRING, QQ_FIELD_MULTI, QQ_FIELD_BOOL, QQ_FIELD_CHOICE
99 }; 99 };
100 100
101 typedef struct { 101 typedef struct {
102 int iclass; 102 int iclass;
103 int type; 103 int type;
502 502
503 void qq_set_custom_icon(PurpleConnection *gc, PurpleStoredImage *img) 503 void qq_set_custom_icon(PurpleConnection *gc, PurpleStoredImage *img)
504 { 504 {
505 PurpleAccount *account = purple_connection_get_account(gc); 505 PurpleAccount *account = purple_connection_get_account(gc);
506 const gchar *icon_path = purple_account_get_buddy_icon_path(account); 506 const gchar *icon_path = purple_account_get_buddy_icon_path(account);
507 gchar **segments;
508 gint index;
509 507
510 g_return_if_fail(icon_path != NULL); 508 g_return_if_fail(icon_path != NULL);
511 509
512 /* Fixme: 510 /* Fixme:
513 * icon_path is always null 511 * icon_path is always null
514 * purple_imgstore_get_filename is always new file 512 * purple_imgstore_get_filename is always new file
515 * QQ buddy may set custom icon if level is over 16 */ 513 * QQ buddy may set custom icon if level is over 16 */
516 purple_debug_info("QQ", "Change my icon to %s\n", icon_path); 514 purple_debug_info("QQ", "Change my icon to %s\n", icon_path);
517 segments = g_strsplit_set(icon_path, G_DIR_SEPARATOR_S, 0);
518 for (index = 0; segments[index] != NULL; index++) {
519 purple_debug_info("QQ", "Split to %s\n", segments[index]);
520 }
521
522 g_strfreev(segments);
523 } 515 }
524 516
525 gchar *qq_get_icon_name(gint face) 517 gchar *qq_get_icon_name(gint face)
526 { 518 {
527 gint icon; 519 gint icon;