Mercurial > pidgin
comparison libpurple/protocols/null/nullprpl.c @ 31904:3322201b446f
I went through all our calls to purple_notify_user_info_add_pair() and
checked whether they should be purple_notify_user_info_add_pair_plaintext(),
instead. If it wasn't immediately obvious one way or the other then I
left a comment to investigate. I suspect there are still a lot of places
where we should use the _plaintext function to escape the value.
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 22 Aug 2011 01:53:37 +0000 |
| parents | 7c33eaed54e5 |
| children | 323876c34a96 |
comparison
equal
deleted
inserted
replaced
| 31903:57d43a9a4e7e | 31904:3322201b446f |
|---|---|
| 256 if (gc) { | 256 if (gc) { |
| 257 /* they're logged in */ | 257 /* they're logged in */ |
| 258 PurplePresence *presence = purple_buddy_get_presence(buddy); | 258 PurplePresence *presence = purple_buddy_get_presence(buddy); |
| 259 PurpleStatus *status = purple_presence_get_active_status(presence); | 259 PurpleStatus *status = purple_presence_get_active_status(presence); |
| 260 char *msg = nullprpl_status_text(buddy); | 260 char *msg = nullprpl_status_text(buddy); |
| 261 /* TODO: Check whether it's correct to call add_pair_html, | |
| 262 or if we should be using add_pair_plaintext */ | |
| 261 purple_notify_user_info_add_pair(info, purple_status_get_name(status), | 263 purple_notify_user_info_add_pair(info, purple_status_get_name(status), |
| 262 msg); | 264 msg); |
| 263 g_free(msg); | 265 g_free(msg); |
| 264 | 266 |
| 265 if (full) { | 267 if (full) { |
| 266 const char *user_info = purple_account_get_user_info(gc->account); | 268 const char *user_info = purple_account_get_user_info(gc->account); |
| 267 if (user_info) | 269 if (user_info) |
| 270 /* TODO: Check whether it's correct to call add_pair_html, | |
| 271 or if we should be using add_pair_plaintext */ | |
| 268 purple_notify_user_info_add_pair(info, _("User info"), user_info); | 272 purple_notify_user_info_add_pair(info, _("User info"), user_info); |
| 269 } | 273 } |
| 270 | 274 |
| 271 } else { | 275 } else { |
| 272 /* they're not logged in */ | 276 /* they're not logged in */ |
| 273 purple_notify_user_info_add_pair(info, _("User info"), _("not logged in")); | 277 purple_notify_user_info_add_pair_plaintext(info, _("User info"), _("not logged in")); |
| 274 } | 278 } |
| 275 | 279 |
| 276 purple_debug_info("nullprpl", "showing %s tooltip for %s\n", | 280 purple_debug_info("nullprpl", "showing %s tooltip for %s\n", |
| 277 (full) ? "full" : "short", buddy->name); | 281 (full) ? "full" : "short", buddy->name); |
| 278 } | 282 } |
| 508 acct = purple_accounts_find(username, NULLPRPL_ID); | 512 acct = purple_accounts_find(username, NULLPRPL_ID); |
| 509 if (acct) | 513 if (acct) |
| 510 body = purple_account_get_user_info(acct); | 514 body = purple_account_get_user_info(acct); |
| 511 else | 515 else |
| 512 body = _("No user info."); | 516 body = _("No user info."); |
| 517 /* TODO: Check whether it's correct to call add_pair_html, | |
| 518 or if we should be using add_pair_plaintext */ | |
| 513 purple_notify_user_info_add_pair(info, "Info", body); | 519 purple_notify_user_info_add_pair(info, "Info", body); |
| 514 | 520 |
| 515 /* show a buddy's user info in a nice dialog box */ | 521 /* show a buddy's user info in a nice dialog box */ |
| 516 purple_notify_userinfo(gc, /* connection the buddy info came through */ | 522 purple_notify_userinfo(gc, /* connection the buddy info came through */ |
| 517 username, /* buddy's username */ | 523 username, /* buddy's username */ |
