Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 27614:fa827f6f990f
Add support for receiving contact details from buddies.
Also, show some contact details (e.g. phone number) in the tooltip and in
'Get Info' when available.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 14 Jul 2009 21:08:56 +0000 |
parents | a12574d982a1 |
children | b909c4a7bfc8 |
comparison
equal
deleted
inserted
replaced
27613:32d2caa6a777 | 27614:fa827f6f990f |
---|---|
2896 yahoo_process_avatar_update(gc, pkt); | 2896 yahoo_process_avatar_update(gc, pkt); |
2897 break; | 2897 break; |
2898 case YAHOO_SERVICE_AUDIBLE: | 2898 case YAHOO_SERVICE_AUDIBLE: |
2899 yahoo_process_audible(gc, pkt); | 2899 yahoo_process_audible(gc, pkt); |
2900 break; | 2900 break; |
2901 case YAHOO_SERVICE_CONTACT_DETAILS: | |
2902 yahoo_process_contact_details(gc, pkt); | |
2903 break; | |
2901 case YAHOO_SERVICE_FILETRANS_15: | 2904 case YAHOO_SERVICE_FILETRANS_15: |
2902 yahoo_process_filetrans_15(gc, pkt); | 2905 yahoo_process_filetrans_15(gc, pkt); |
2903 break; | 2906 break; |
2904 case YAHOO_SERVICE_FILETRANS_INFO_15: | 2907 case YAHOO_SERVICE_FILETRANS_INFO_15: |
2905 yahoo_process_filetrans_info_15(gc, pkt); | 2908 yahoo_process_filetrans_info_15(gc, pkt); |
3537 g_free(yd->pending_chat_id); | 3540 g_free(yd->pending_chat_id); |
3538 g_free(yd->pending_chat_topic); | 3541 g_free(yd->pending_chat_topic); |
3539 g_free(yd->pending_chat_goto); | 3542 g_free(yd->pending_chat_goto); |
3540 g_strfreev(yd->profiles); | 3543 g_strfreev(yd->profiles); |
3541 | 3544 |
3542 yahoo_personal_details_reset(&yd->ypd); | 3545 yahoo_personal_details_reset(&yd->ypd, TRUE); |
3543 | 3546 |
3544 g_free(yd->current_list15_grp); | 3547 g_free(yd->current_list15_grp); |
3545 | 3548 |
3546 g_free(yd); | 3549 g_free(yd); |
3547 gc->proto_data = NULL; | 3550 gc->proto_data = NULL; |
3770 g_free(escaped); | 3773 g_free(escaped); |
3771 } | 3774 } |
3772 | 3775 |
3773 if (presence != NULL) | 3776 if (presence != NULL) |
3774 purple_notify_user_info_add_pair(user_info, _("Presence"), presence); | 3777 purple_notify_user_info_add_pair(user_info, _("Presence"), presence); |
3778 | |
3779 if (full) { | |
3780 YahooPersonalDetails *ypd = &f->ypd; | |
3781 int i; | |
3782 struct { | |
3783 char *id; | |
3784 char *text; | |
3785 char *value; | |
3786 } yfields[] = { | |
3787 {"hp", N_("Home Phone Number"), ypd->phone.home}, | |
3788 {"wp", N_("Work Phone Number"), ypd->phone.work}, | |
3789 {"mo", N_("Mobile Phone Number"), ypd->phone.mobile}, | |
3790 {NULL, NULL, NULL} | |
3791 }; | |
3792 for (i = 0; yfields[i].id; i++) { | |
3793 if (!yfields[i].value || !*yfields[i].value) | |
3794 continue; | |
3795 purple_notify_user_info_add_pair(user_info, _(yfields[i].text), yfields[i].value); | |
3796 } | |
3797 } | |
3775 } | 3798 } |
3776 | 3799 |
3777 static void yahoo_addbuddyfrommenu_cb(PurpleBlistNode *node, gpointer data) | 3800 static void yahoo_addbuddyfrommenu_cb(PurpleBlistNode *node, gpointer data) |
3778 { | 3801 { |
3779 PurpleBuddy *buddy; | 3802 PurpleBuddy *buddy; |