changeset 18105:d346544e9c30

Use _notify_userinfo instead of _notify_error when there's an error retrieving user information. Fixes #1692. References #387.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 16 Jun 2007 20:04:36 +0000
parents e4d21d4dfcca
children 7ee44399f2ea
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Fri Jun 15 08:39:01 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sat Jun 16 20:04:36 2007 +0000
@@ -2809,6 +2809,7 @@
 	va_list ap;
 	guint16 reason;
 	char *destn;
+	PurpleNotifyUserInfo *user_info;
 
 	va_start(ap, fr);
 	reason = (guint16) va_arg(ap, unsigned int);
@@ -2818,12 +2819,12 @@
 	if (destn == NULL)
 		return 1;
 
+	user_info = purple_notify_user_info_new();
 	buf = g_strdup_printf(_("User information not available: %s"), (reason < msgerrreasonlen) ? _(msgerrreason[reason]) : _("Unknown reason."));
-	if (!purple_conv_present_error(destn, purple_connection_get_account((PurpleConnection*)od->gc), buf)) {
-		g_free(buf);
-		buf = g_strdup_printf(_("User information for %s unavailable:"), destn);
-		purple_notify_error(od->gc, NULL, buf, (reason < msgerrreasonlen) ? _(msgerrreason[reason]) : _("Unknown reason."));
-	}
+	purple_notify_user_info_add_pair(user_info, NULL, buf);
+	purple_notify_userinfo(od->gc, destn, user_info, NULL, NULL);
+	purple_notify_user_info_destroy(user_info);
+	purple_conv_present_error(destn, purple_connection_get_account(od->gc), buf);
 	g_free(buf);
 
 	return 1;