Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 32358:ce6ef84fb8a0
Simplify. This is 6 lines instead of 15.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 21 Aug 2011 18:04:00 +0000 |
parents | 1aa7d06e30c0 |
children | dc3ea8f6381a |
comparison
equal
deleted
inserted
replaced
32357:1aa7d06e30c0 | 32358:ce6ef84fb8a0 |
---|---|
4034 if (presence != NULL) | 4034 if (presence != NULL) |
4035 purple_notify_user_info_add_pair_plaintext(user_info, _("Presence"), presence); | 4035 purple_notify_user_info_add_pair_plaintext(user_info, _("Presence"), presence); |
4036 | 4036 |
4037 if (f && full) { | 4037 if (f && full) { |
4038 YahooPersonalDetails *ypd = &f->ypd; | 4038 YahooPersonalDetails *ypd = &f->ypd; |
4039 int i; | 4039 if (ypd->phone.home && *ypd->phone.home) |
4040 struct { | 4040 purple_notify_user_info_add_pair(user_info, _("Home Phone Number"), ypd->phone.home); |
4041 char *text; | 4041 if (ypd->phone.work && *ypd->phone.work) |
4042 char *value; | 4042 purple_notify_user_info_add_pair(user_info, _("Work Phone Number"), ypd->phone.work); |
4043 } yfields[] = { | 4043 if (ypd->phone.mobile && *ypd->phone.mobile) |
4044 {N_("Home Phone Number"), ypd->phone.home}, | 4044 purple_notify_user_info_add_pair(user_info, _("Mobile Phone Number"), ypd->phone.mobile); |
4045 {N_("Work Phone Number"), ypd->phone.work}, | |
4046 {N_("Mobile Phone Number"), ypd->phone.mobile}, | |
4047 {NULL, NULL} | |
4048 }; | |
4049 for (i = 0; yfields[i].text; i++) { | |
4050 if (!yfields[i].value || !*yfields[i].value) | |
4051 continue; | |
4052 purple_notify_user_info_add_pair(user_info, _(yfields[i].text), yfields[i].value); | |
4053 } | |
4054 } | 4045 } |
4055 } | 4046 } |
4056 | 4047 |
4057 static void yahoo_addbuddyfrommenu_cb(PurpleBlistNode *node, gpointer data) | 4048 static void yahoo_addbuddyfrommenu_cb(PurpleBlistNode *node, gpointer data) |
4058 { | 4049 { |