| 392 const char **nw, const char **ne) |
392 const char **nw, const char **ne) |
| 393 { |
393 { |
| 394 MsnUser *user; |
394 MsnUser *user; |
| 395 GaimPresence *presence; |
395 GaimPresence *presence; |
| 396 const char *emblems[4] = { NULL, NULL, NULL, NULL }; |
396 const char *emblems[4] = { NULL, NULL, NULL, NULL }; |
| 397 int i = 0; |
397 int i = 1; |
| 398 |
398 |
| 399 user = b->proto_data; |
399 user = b->proto_data; |
| 400 presence = gaim_buddy_get_presence(b); |
400 presence = gaim_buddy_get_presence(b); |
| 401 |
401 |
| |
402 if (user == NULL) |
| |
403 { |
| |
404 emblems[0] = "offline"; |
| |
405 } |
| |
406 else |
| |
407 { |
| |
408 if (!(user->list_op & (1 << MSN_LIST_RL))) |
| |
409 emblems[0] = "nr"; |
| |
410 if (user->list_op & (1 << MSN_LIST_BL)) |
| |
411 emblems[i++] = "blocked"; |
| |
412 if (user->mobile) |
| |
413 emblems[i++] = "wireless"; |
| |
414 } |
| |
415 |
| 402 if (!gaim_presence_is_online(presence)) |
416 if (!gaim_presence_is_online(presence)) |
| 403 emblems[i++] = "offline"; |
417 { |
| |
418 if (emblems[0] == NULL) |
| |
419 emblems[0] = "offline"; |
| |
420 } |
| 404 else if (gaim_presence_is_status_active(presence, "busy") || |
421 else if (gaim_presence_is_status_active(presence, "busy") || |
| 405 gaim_presence_is_status_active(presence, "phone")) |
422 gaim_presence_is_status_active(presence, "phone")) |
| 406 emblems[i++] = "occupied"; |
423 emblems[i++] = "occupied"; |
| 407 else if (gaim_presence_is_status_active(presence, "away") || |
424 else if (gaim_presence_is_status_active(presence, "away") || |
| 408 gaim_presence_is_idle(presence)) |
425 gaim_presence_is_idle(presence)) |
| 409 emblems[i++] = "away"; |
426 emblems[i++] = "away"; |
| 410 |
427 |
| 411 if (user == NULL) |
|
| 412 { |
|
| 413 emblems[0] = "offline"; |
|
| 414 } |
|
| 415 else if (user->mobile) |
|
| 416 emblems[i++] = "wireless"; |
|
| 417 |
|
| 418 *se = emblems[0]; |
428 *se = emblems[0]; |
| 419 *sw = emblems[1]; |
429 *sw = emblems[1]; |
| 420 *nw = emblems[2]; |
430 *nw = emblems[2]; |
| 421 *ne = emblems[3]; |
431 *ne = emblems[3]; |
| 422 } |
432 } |
| 454 g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Status"), |
464 g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Status"), |
| 455 gaim_presence_is_idle(presence) ? |
465 gaim_presence_is_idle(presence) ? |
| 456 _("Idle") : gaim_status_get_name(status)); |
466 _("Idle") : gaim_status_get_name(status)); |
| 457 } |
467 } |
| 458 |
468 |
| 459 g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Has you"), |
469 if (user) |
| 460 (user->list_op & (1 << MSN_LIST_RL)) ? |
470 { |
| 461 _("Yes") : _("No")); |
471 g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Has you"), |
| |
472 (user->list_op & (1 << MSN_LIST_RL)) ? |
| |
473 _("Yes") : _("No")); |
| |
474 |
| |
475 g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Blocked"), |
| |
476 (user->list_op & (1 << MSN_LIST_BL)) ? |
| |
477 _("Yes") : _("No")); |
| |
478 } |
| |
479 |
| 462 |
480 |
| 463 return g_string_free(s, FALSE); |
481 return g_string_free(s, FALSE); |
| 464 } |
482 } |
| 465 |
483 |
| 466 static GList * |
484 static GList * |