libpurple/protocols/sametime/sametime.c

changeset 32188
cb9cad610bc6
parent 32162
cf848cd25330
child 32189
3af8d41121b6
equal deleted inserted replaced
32187:c6fea2802469 32188:cb9cad610bc6
3335 3335
3336 if(message != NULL && g_utf8_validate(message, -1, NULL) && purple_utf8_strcasecmp(status, message)) { 3336 if(message != NULL && g_utf8_validate(message, -1, NULL) && purple_utf8_strcasecmp(status, message)) {
3337 purple_notify_user_info_add_pair_plaintext(user_info, status, message); 3337 purple_notify_user_info_add_pair_plaintext(user_info, status, message);
3338 3338
3339 } else { 3339 } else {
3340 purple_notify_user_info_add_pair(user_info, _("Status"), status); 3340 purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), status);
3341 } 3341 }
3342 3342
3343 if(full && pd != NULL) { 3343 if(full && pd != NULL) {
3344 tmp = user_supports_text(pd->srvc_aware, purple_buddy_get_name(b)); 3344 tmp = user_supports_text(pd->srvc_aware, purple_buddy_get_name(b));
3345 if(tmp) { 3345 if(tmp) {
3346 purple_notify_user_info_add_pair(user_info, _("Supports"), tmp); 3346 purple_notify_user_info_add_pair_plaintext(user_info, _("Supports"), tmp);
3347 g_free(tmp); 3347 g_free(tmp);
3348 } 3348 }
3349 3349
3350 if(buddy_is_external(b)) { 3350 if(buddy_is_external(b)) {
3351 purple_notify_user_info_add_pair_plaintext(user_info, NULL, _("External User")); 3351 purple_notify_user_info_add_pair_plaintext(user_info, NULL, _("External User"));
4199 4199
4200 if(purple_str_has_prefix(who, "@E ")) { 4200 if(purple_str_has_prefix(who, "@E ")) {
4201 purple_notify_user_info_add_pair(user_info, _("External User"), NULL); 4201 purple_notify_user_info_add_pair(user_info, _("External User"), NULL);
4202 } 4202 }
4203 4203
4204 purple_notify_user_info_add_pair(user_info, _("User ID"), who); 4204 purple_notify_user_info_add_pair_plaintext(user_info, _("User ID"), who);
4205 4205
4206 if(b) { 4206 if(b) {
4207 guint32 type; 4207 guint32 type;
4208 4208
4209 if(purple_buddy_get_server_alias(b)) { 4209 if(purple_buddy_get_server_alias(b)) {
4210 /* TODO: Check whether it's correct to call add_pair_html,
4211 or if we should be using add_pair_plaintext */
4210 purple_notify_user_info_add_pair(user_info, _("Full Name"), purple_buddy_get_server_alias(b)); 4212 purple_notify_user_info_add_pair(user_info, _("Full Name"), purple_buddy_get_server_alias(b));
4211 } 4213 }
4212 4214
4213 type = purple_blist_node_get_int((PurpleBlistNode *) b, BUDDY_KEY_CLIENT); 4215 type = purple_blist_node_get_int((PurpleBlistNode *) b, BUDDY_KEY_CLIENT);
4214 if(type) { 4216 if(type) {
4215 tmp = g_strdup(mw_client_name(type)); 4217 tmp2 = mw_client_name(type);
4216 if (!tmp) 4218 if (tmp2) {
4219 purple_notify_user_info_add_pair_plaintext(user_info, _("Last Known Client"), tmp2);
4220 } else {
4217 tmp = g_strdup_printf(_("Unknown (0x%04x)<br>"), type); 4221 tmp = g_strdup_printf(_("Unknown (0x%04x)<br>"), type);
4218 4222 purple_notify_user_info_add_pair(user_info, _("Last Known Client"), tmp);
4219 purple_notify_user_info_add_pair(user_info, _("Last Known Client"), tmp); 4223 g_free(tmp);
4220 4224 }
4221 g_free(tmp);
4222 } 4225 }
4223 } 4226 }
4224 4227
4225 tmp = user_supports_text(pd->srvc_aware, who); 4228 tmp = user_supports_text(pd->srvc_aware, who);
4226 if(tmp) { 4229 if(tmp) {
4227 purple_notify_user_info_add_pair(user_info, _("Supports"), tmp); 4230 purple_notify_user_info_add_pair_plaintext(user_info, _("Supports"), tmp);
4228 g_free(tmp); 4231 g_free(tmp);
4229 } 4232 }
4230 4233
4231 if(b) { 4234 if(b) {
4232 purple_notify_user_info_add_pair(user_info, _("Status"), status_text(b)); 4235 purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), status_text(b));
4233 4236
4234 /* XXX Is this adding a status message in its own section rather than with the "Status" label? */ 4237 /* XXX Is this adding a status message in its own section rather than with the "Status" label? */
4235 tmp2 = mwServiceAware_getText(pd->srvc_aware, &idb); 4238 tmp2 = mwServiceAware_getText(pd->srvc_aware, &idb);
4236 if(tmp2 && g_utf8_validate(tmp2, -1, NULL)) { 4239 if(tmp2 && g_utf8_validate(tmp2, -1, NULL)) {
4237 tmp = g_markup_escape_text(tmp2, -1);
4238 purple_notify_user_info_add_section_break(user_info); 4240 purple_notify_user_info_add_section_break(user_info);
4239 purple_notify_user_info_add_pair(user_info, NULL, tmp); 4241 purple_notify_user_info_add_pair_plaintext(user_info, NULL, tmp2);
4240 g_free(tmp);
4241 } 4242 }
4242 } 4243 }
4243 4244
4244 /* @todo emit a signal to allow a plugin to override the display of 4245 /* @todo emit a signal to allow a plugin to override the display of
4245 this notification, so that it can create its own */ 4246 this notification, so that it can create its own */

mercurial