changeset 7692:8a826b27fcfb

[gaim-migrate @ 8337] Buddy comments in the tooltip for AIM and ICQ peeps. This makes them not quite entirely useless! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 02 Dec 2003 04:04:11 +0000
parents 76e5f748654e
children 1d0314b99747
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Tue Dec 02 04:00:34 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Dec 02 04:04:11 2003 +0000
@@ -5438,6 +5438,7 @@
 static char *oscar_tooltip_text(GaimBuddy *b) {
 	GaimConnection *gc = b->account->gc;
 	OscarData *od = gc->proto_data;
+	GaimGroup *g = gaim_find_buddys_group(b);
 	struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(b->account, b->name));
 	aim_userinfo_t *userinfo = aim_locate_finduserinfo(od->sess, b->name);
 	gchar *tmp = NULL, *ret = g_strdup("");
@@ -5480,6 +5481,17 @@
 			g_free(tmp);
 		}
 
+		if (g && g->name) {
+			char *comment = NULL;
+			comment = aim_ssi_getcomment(od->sess->ssi.local, g->name, b->name);
+			if (comment != NULL) {
+				tmp = ret;
+				ret = g_strconcat(tmp, _("<b>Buddy Comment:</b> "), comment, "\n", NULL);
+				free(tmp);
+				free(comment);
+			}
+		}
+
 		if ((bi != NULL) && (bi->availmsg != NULL) && !(b->uc & UC_UNAVAILABLE)) {
 			gchar *escaped = g_markup_escape_text(bi->availmsg, strlen(bi->availmsg));
 			tmp = ret;