diff src/protocols/oscar/oscar.c @ 10439:911530134bf8

[gaim-migrate @ 11697] sf patch #1086253, from Alex Converse closes sf rfe #991372, from Adam Petaccia "New Buddy Search Results Dialog," used for oscar Also some memleak fixes from me. My bad. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 28 Dec 2004 06:24:32 +0000
parents 046be0a754b6
children 6bf9b17c03a5
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Mon Dec 27 21:24:20 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Dec 28 06:24:32 2004 +0000
@@ -5197,7 +5197,7 @@
 {
 	GaimConnection *gc = sess->aux_data;
 	gchar *secondary;
-	GString *text;
+	gchar **screennames;
 	int i, num;
 	va_list ap;
 	char *email, *SNs;
@@ -5208,14 +5208,19 @@
 	SNs = va_arg(ap, char *);
 	va_end(ap);
 
+	/* TODO: Need to use ngettext() here */
 	secondary = g_strdup_printf(_("The following screen names are associated with %s"), email);
-	text = g_string_new("");
+
+	screennames = g_malloc((num + 1) * sizeof(gchar *));
 	for (i = 0; i < num; i++)
-		g_string_append_printf(text, "%s<br>", &SNs[i * (MAXSNLEN + 1)]);
-	gaim_notify_formatted(gc, NULL, _("Search Results"), secondary, text->str, NULL, NULL);
+		screennames[i] = g_strdup(&SNs[i * (MAXSNLEN + 1)]);
+	screennames[num] = NULL;
+
+	gaim_notify_searchresults(gc, NULL, NULL, secondary,
+							  (const char **)screennames, NULL, NULL);
 
 	g_free(secondary);
-	g_string_free(text, TRUE);
+	g_strfreev(screennames);
 
 	return 1;
 }