diff 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
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/bonjour.c	Thu Aug 09 22:10:44 2007 +0000
+++ b/libpurple/protocols/bonjour/bonjour.c	Thu Aug 09 22:37:06 2007 +0000
@@ -319,6 +319,7 @@
 {
 	PurplePresence *presence;
 	PurpleStatus *status;
+	BonjourBuddy *bb = buddy->proto_data;
 	const char *status_description;
 	const char *message;
 
@@ -336,6 +337,23 @@
 	purple_notify_user_info_add_pair(user_info, _("Status"), status_description);
 	if (message != NULL)
 		purple_notify_user_info_add_pair(user_info, _("Message"), message);
+
+	/* Only show first/last name if there is a nickname set (to avoid duplication) */
+	if (bb->nick != NULL) {
+		if (bb->first != NULL)
+			purple_notify_user_info_add_pair(user_info, _("First name"), bb->first);
+		if (bb->first != NULL)
+			purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last);
+	}
+
+	if (bb->email != NULL)
+		purple_notify_user_info_add_pair(user_info, _("E-Mail"), bb->email);
+
+	if (bb->AIM != NULL)
+		purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM);
+
+	if (bb->jid!= NULL)
+		purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid);
 }
 
 static gboolean