Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/buddy_info.c @ 24092:7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
* 2007 remove buddy ok
* Removed group_search.c/h
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Tue, 28 Oct 2008 16:44:09 +0000 |
parents | 147f1b17b6ce |
children | 7f5433ffbf8d |
comparison
equal
deleted
inserted
replaced
24091:d35672443baa | 24092:7c0a56c5fea0 |
---|---|
155 } modify_info_request; | 155 } modify_info_request; |
156 | 156 |
157 #ifdef DEBUG | 157 #ifdef DEBUG |
158 static void info_debug(gchar **segments) | 158 static void info_debug(gchar **segments) |
159 { | 159 { |
160 #if 0 | |
160 int index; | 161 int index; |
161 gchar *utf8_str; | 162 gchar *utf8_str; |
162 for (index = 0; segments[index] != NULL && index < QQ_INFO_LAST; index++) { | 163 for (index = 0; segments[index] != NULL && index < QQ_INFO_LAST; index++) { |
163 if (field_infos[index].type == QQ_FIELD_STRING | 164 if (field_infos[index].type == QQ_FIELD_STRING |
164 || field_infos[index].type == QQ_FIELD_LABEL | 165 || field_infos[index].type == QQ_FIELD_LABEL |
169 g_free(utf8_str); | 170 g_free(utf8_str); |
170 continue; | 171 continue; |
171 } | 172 } |
172 purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index].text, segments[index]); | 173 purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index].text, segments[index]); |
173 } | 174 } |
175 #endif | |
174 } | 176 } |
175 #endif | 177 #endif |
176 | 178 |
177 static void info_display_only(PurpleConnection *gc, gchar **segments) | 179 static void info_display_only(PurpleConnection *gc, gchar **segments) |
178 { | 180 { |
452 | 454 |
453 qd = (qq_data *) gc->proto_data; | 455 qd = (qq_data *) gc->proto_data; |
454 | 456 |
455 data[data_len] = '\0'; | 457 data[data_len] = '\0'; |
456 if (qd->uid != atoi((gchar *) data)) { /* return should be my uid */ | 458 if (qd->uid != atoi((gchar *) data)) { /* return should be my uid */ |
457 purple_debug_info("QQ", "Update info ACK OK\n"); | 459 purple_debug_info("QQ", "Failed Updating info\n"); |
458 qq_got_attention(gc, _("Successed changing buddy information.")); | 460 qq_got_attention(gc, _("Failed changing buddy information.")); |
459 } | 461 } |
460 } | 462 } |
461 | 463 |
462 static void request_set_buddy_icon(PurpleConnection *gc, gint face_num) | 464 static void request_set_buddy_icon(PurpleConnection *gc, gint face_num) |
463 { | 465 { |
549 | 551 |
550 icon = face / 3 + 1; | 552 icon = face / 3 + 1; |
551 if (face < 1 || face > QQ_FACES) { | 553 if (face < 1 || face > QQ_FACES) { |
552 icon = 1; | 554 icon = 1; |
553 } | 555 } |
554 | 556 |
555 icon_name = g_strdup_printf("%s%d%s", QQ_ICON_PREFIX, icon, QQ_ICON_SUFFIX); | 557 icon_name = g_strdup_printf("%s%d%s", QQ_ICON_PREFIX, icon, QQ_ICON_SUFFIX); |
556 return icon_name; | 558 return icon_name; |
557 } | 559 } |
558 | 560 |
559 gchar *qq_get_icon_path(gchar *icon_name) | 561 gchar *qq_get_icon_path(gchar *icon_name) |
589 gchar *icon_path; | 591 gchar *icon_path; |
590 gchar *icon_file_content; | 592 gchar *icon_file_content; |
591 gsize icon_file_size; | 593 gsize icon_file_size; |
592 | 594 |
593 g_return_if_fail(account != NULL && who != NULL); | 595 g_return_if_fail(account != NULL && who != NULL); |
594 | 596 |
595 purple_debug_info("QQ", "Update %s icon to %d\n", who, face); | 597 purple_debug_info("QQ", "Update %s icon to %d\n", who, face); |
596 | 598 |
597 icon_name = qq_get_icon_name(face); | 599 icon_name = qq_get_icon_name(face); |
598 if ((buddy = purple_find_buddy(account, who))) { | 600 if ((buddy = purple_find_buddy(account, who))) { |
599 icon_name_prev = purple_buddy_icons_get_checksum_for_user(buddy); | 601 icon_name_prev = purple_buddy_icons_get_checksum_for_user(buddy); |