Mercurial > pidgin
comparison libpurple/protocols/bonjour/bonjour.c @ 18857:bc9b78ba996a
Add data to the bonjour tooltip.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 09 Aug 2007 22:37:06 +0000 |
parents | 5da32c4019ce |
children | affacee881e8 315151da0dc6 |
comparison
equal
deleted
inserted
replaced
18856:5da32c4019ce | 18857:bc9b78ba996a |
---|---|
317 static void | 317 static void |
318 bonjour_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full) | 318 bonjour_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full) |
319 { | 319 { |
320 PurplePresence *presence; | 320 PurplePresence *presence; |
321 PurpleStatus *status; | 321 PurpleStatus *status; |
322 BonjourBuddy *bb = buddy->proto_data; | |
322 const char *status_description; | 323 const char *status_description; |
323 const char *message; | 324 const char *message; |
324 | 325 |
325 presence = purple_buddy_get_presence(buddy); | 326 presence = purple_buddy_get_presence(buddy); |
326 status = purple_presence_get_active_status(presence); | 327 status = purple_presence_get_active_status(presence); |
334 status_description = purple_status_get_name(status); | 335 status_description = purple_status_get_name(status); |
335 | 336 |
336 purple_notify_user_info_add_pair(user_info, _("Status"), status_description); | 337 purple_notify_user_info_add_pair(user_info, _("Status"), status_description); |
337 if (message != NULL) | 338 if (message != NULL) |
338 purple_notify_user_info_add_pair(user_info, _("Message"), message); | 339 purple_notify_user_info_add_pair(user_info, _("Message"), message); |
340 | |
341 /* Only show first/last name if there is a nickname set (to avoid duplication) */ | |
342 if (bb->nick != NULL) { | |
343 if (bb->first != NULL) | |
344 purple_notify_user_info_add_pair(user_info, _("First name"), bb->first); | |
345 if (bb->first != NULL) | |
346 purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last); | |
347 } | |
348 | |
349 if (bb->email != NULL) | |
350 purple_notify_user_info_add_pair(user_info, _("E-Mail"), bb->email); | |
351 | |
352 if (bb->AIM != NULL) | |
353 purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM); | |
354 | |
355 if (bb->jid!= NULL) | |
356 purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid); | |
339 } | 357 } |
340 | 358 |
341 static gboolean | 359 static gboolean |
342 plugin_unload(PurplePlugin *plugin) | 360 plugin_unload(PurplePlugin *plugin) |
343 { | 361 { |