| 72 |
72 |
| 73 static void |
73 static void |
| 74 _sync_privacy_lists(NMUser *user); |
74 _sync_privacy_lists(NMUser *user); |
| 75 |
75 |
| 76 static void |
76 static void |
| 77 _show_info(PurpleConnection * gc, NMUserRecord * user_record); |
77 _show_info(PurpleConnection * gc, NMUserRecord * user_record, char * name); |
| 78 |
78 |
| 79 const char * |
79 const char * |
| 80 _get_conference_name(int id); |
80 _get_conference_name(int id); |
| 81 |
81 |
| 82 /******************************************************************************* |
82 /******************************************************************************* |
| 703 |
703 |
| 704 if (ret_code == NM_OK) { |
704 if (ret_code == NM_OK) { |
| 705 user_record = (NMUserRecord *) resp_data; |
705 user_record = (NMUserRecord *) resp_data; |
| 706 if (user_record) { |
706 if (user_record) { |
| 707 _show_info(purple_account_get_connection(user->client_data), |
707 _show_info(purple_account_get_connection(user->client_data), |
| 708 user_record); |
708 user_record, g_strdup(name)); |
| 709 } |
709 } |
| 710 } else { |
710 } else { |
| 711 gc = purple_account_get_connection(user->client_data); |
711 gc = purple_account_get_connection(user->client_data); |
| 712 err = |
712 err = |
| 713 g_strdup_printf(_("Could not get details for user %s (%s)."), |
713 g_strdup_printf(_("Could not get details for user %s (%s)."), |
| 1503 return tag; |
1503 return tag; |
| 1504 } |
1504 } |
| 1505 |
1505 |
| 1506 /* Display a dialog box showing the properties for the given user record */ |
1506 /* Display a dialog box showing the properties for the given user record */ |
| 1507 static void |
1507 static void |
| 1508 _show_info(PurpleConnection * gc, NMUserRecord * user_record) |
1508 _show_info(PurpleConnection * gc, NMUserRecord * user_record, char * name) |
| 1509 { |
1509 { |
| 1510 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
1510 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
| 1511 int count, i; |
1511 int count, i; |
| 1512 NMProperty *property; |
1512 NMProperty *property; |
| 1513 const char *tag, *value; |
1513 const char *tag, *value; |
| 1542 } |
1542 } |
| 1543 nm_release_property(property); |
1543 nm_release_property(property); |
| 1544 } |
1544 } |
| 1545 } |
1545 } |
| 1546 |
1546 |
| 1547 purple_notify_userinfo(gc, nm_user_record_get_userid(user_record), |
1547 purple_notify_userinfo(gc, name, user_info, NULL, NULL); |
| 1548 user_info, NULL, NULL); |
|
| 1549 purple_notify_user_info_destroy(user_info); |
1548 purple_notify_user_info_destroy(user_info); |
| |
1549 |
| |
1550 g_free(name); |
| 1550 } |
1551 } |
| 1551 |
1552 |
| 1552 /* Send a join conference, the first item in the parms list is the |
1553 /* Send a join conference, the first item in the parms list is the |
| 1553 * NMUser object and the second item is the conference to join. |
1554 * NMUser object and the second item is the conference to join. |
| 1554 * This callback is passed to purple_request_action when we ask the |
1555 * This callback is passed to purple_request_action when we ask the |
| 2910 user = (NMUser *) gc->proto_data; |
2911 user = (NMUser *) gc->proto_data; |
| 2911 if (user) { |
2912 if (user) { |
| 2912 |
2913 |
| 2913 user_record = nm_find_user_record(user, name); |
2914 user_record = nm_find_user_record(user, name); |
| 2914 if (user_record) { |
2915 if (user_record) { |
| 2915 |
2916 _show_info(gc, user_record, g_strdup(name)); |
| 2916 _show_info(gc, user_record); |
|
| 2917 |
2917 |
| 2918 } else { |
2918 } else { |
| 2919 |
|
| 2920 rc = nm_send_get_details(user, name, |
2919 rc = nm_send_get_details(user, name, |
| 2921 _get_details_resp_show_info, g_strdup(name)); |
2920 _get_details_resp_show_info, g_strdup(name)); |
| 2922 |
2921 |
| 2923 _check_for_disconnect(user, rc); |
2922 _check_for_disconnect(user, rc); |
| 2924 |
2923 |