| 1492 |
1492 |
| 1493 /* Display a dialog box showing the properties for the given user record */ |
1493 /* Display a dialog box showing the properties for the given user record */ |
| 1494 static void |
1494 static void |
| 1495 _show_info(GaimConnection * gc, NMUserRecord * user_record) |
1495 _show_info(GaimConnection * gc, NMUserRecord * user_record) |
| 1496 { |
1496 { |
| |
1497 GaimNotifyUserInfo *user_info = gaim_notify_user_info_new(); |
| 1497 GString *info_text; |
1498 GString *info_text; |
| 1498 int count, i; |
1499 int count, i; |
| 1499 NMProperty *property; |
1500 NMProperty *property; |
| 1500 const char *tag, *value; |
1501 const char *tag, *value; |
| 1501 |
1502 |
| 1502 info_text = g_string_new(""); |
1503 info_text = g_string_new(""); |
| 1503 |
1504 |
| 1504 tag = _("User ID"); |
1505 tag = _("User ID"); |
| 1505 value = nm_user_record_get_userid(user_record); |
1506 value = nm_user_record_get_userid(user_record); |
| 1506 if (value) { |
1507 if (value) { |
| 1507 g_string_append_printf(info_text, "<b>%s:</b> %s<br>", tag, value); |
1508 gaim_notify_user_info_add_pair(user_info, tag, value); |
| 1508 } |
1509 } |
| 1509 |
1510 |
| 1510 /* tag = _("DN"); |
1511 /* tag = _("DN"); |
| 1511 value = nm_user_record_get_dn(user_record); |
1512 value = nm_user_record_get_dn(user_record); |
| 1512 if (value) { |
1513 if (value) { |
| 1513 g_string_append_printf(info_text, "<b>%s:</b> %s<br>", |
1514 gaim_notify_user_info_add_pair(user_info, tag, value); |
| 1514 tag, value); |
|
| 1515 } |
1515 } |
| 1516 */ |
1516 */ |
| 1517 |
1517 |
| 1518 tag = _("Full name"); |
1518 tag = _("Full name"); |
| 1519 value = nm_user_record_get_full_name(user_record); |
1519 value = nm_user_record_get_full_name(user_record); |
| 1520 if (value) { |
1520 if (value) { |
| 1521 g_string_append_printf(info_text, "<b>%s:</b> %s<br>", tag, value); |
1521 gaim_notify_user_info_add_pair(user_info, tag, value); |
| 1522 } |
1522 } |
| 1523 |
1523 |
| 1524 count = nm_user_record_get_property_count(user_record); |
1524 count = nm_user_record_get_property_count(user_record); |
| 1525 for (i = 0; i < count; i++) { |
1525 for (i = 0; i < count; i++) { |
| 1526 property = nm_user_record_get_property(user_record, i); |
1526 property = nm_user_record_get_property(user_record, i); |
| 1527 if (property) { |
1527 if (property) { |
| 1528 tag = _map_property_tag(nm_property_get_tag(property)); |
1528 tag = _map_property_tag(nm_property_get_tag(property)); |
| 1529 value = nm_property_get_value(property); |
1529 value = nm_property_get_value(property); |
| 1530 if (tag && value) { |
1530 if (tag && value) { |
| 1531 g_string_append_printf(info_text, "<b>%s:</b> %s<br>", |
1531 gaim_notify_user_info_add_pair(user_info, tag, value); |
| 1532 tag, value); |
|
| 1533 } |
1532 } |
| 1534 nm_release_property(property); |
1533 nm_release_property(property); |
| 1535 } |
1534 } |
| 1536 } |
1535 } |
| 1537 |
1536 |
| 1538 gaim_notify_userinfo(gc, nm_user_record_get_userid(user_record), |
1537 gaim_notify_userinfo(gc, nm_user_record_get_userid(user_record), |
| 1539 info_text->str, NULL, NULL); |
1538 user_info, NULL, NULL); |
| 1540 |
1539 gaim_notify_user_info_destroy(user_info); |
| 1541 g_string_free(info_text, TRUE); |
|
| 1542 } |
1540 } |
| 1543 |
1541 |
| 1544 /* Send a join conference, the first item in the parms list is the |
1542 /* Send a join conference, the first item in the parms list is the |
| 1545 * NMUser object and the second item is the conference to join. |
1543 * NMUser object and the second item is the conference to join. |
| 1546 * This callback is passed to gaim_request_action when we ask the |
1544 * This callback is passed to gaim_request_action when we ask the |