changeset 27790:1aab44eab011

normalize buddy's alias name to be appeared in the window title.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 12 Mar 2008 19:31:01 +0000
parents 9f67f9a58564
children ab1185e87ca5
files libpurple/conversation.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/conversation.c	Wed Mar 12 17:02:04 2008 +0000
+++ b/libpurple/conversation.c	Wed Mar 12 19:31:01 2008 +0000
@@ -656,6 +656,8 @@
 	PurpleBuddy *b;
 	PurpleChat *chat;
 	const char *text = NULL, *name;
+	gchar *utf8;
+	gsize dummy;
 
 	g_return_if_fail(conv != NULL);
 
@@ -674,7 +676,9 @@
 	if(text == NULL)
 		text = name;
 
-	purple_conversation_set_title(conv, text);
+	utf8 = sanitize_utf(text, strlen(text), &dummy);
+	purple_conversation_set_title(conv, utf8);
+	g_free(utf8);
 }
 
 void