diff libpurple/protocols/qq/im.c @ 23880:1a0caf9983fa

applied changes from 92d52eef2994d2697999177804e3665989cfa352 through 5688199e261449d33b5803dafff50d860896ebcb Reapplied 5688199e261449d33b5803dafff50d860896ebcb. 2008.09.04 - ccpaging <ccpaging(at)gmail.com> * minor code cleaned committer: Daniel Atallah <daniel.atallah@gmail.com>
author SHiNE CsyFeK <csyfek@gmail.com>
date Mon, 15 Sep 2008 03:02:06 +0000
parents 23cec4360d4a
children b67eb6f3f026
line wrap: on
line diff
--- a/libpurple/protocols/qq/im.c	Mon Sep 15 03:01:03 2008 +0000
+++ b/libpurple/protocols/qq/im.c	Mon Sep 15 03:02:06 2008 +0000
@@ -250,6 +250,7 @@
 	guint8 *temp;
 	guint8 temp_len;
 	gchar *title, *brief, *url;
+	gchar *title_utf8;
 	gchar *content, *content_utf8;
 
 	g_return_if_fail(data != NULL && data_len != 0);
@@ -276,15 +277,17 @@
 	bytes += qq_getdata(temp, temp_len, data+bytes);
 	url = g_strndup((gchar *)temp, temp_len);
 
-	content = g_strdup_printf(_("Title: %s\nBrief: %s\n\n%s"), title, brief, url);
+	title_utf8 = qq_to_utf8(title, QQ_CHARSET_DEFAULT);
+	content = g_strdup_printf(_("%s\n\n%s"), brief, url);
 	content_utf8 = qq_to_utf8(content, QQ_CHARSET_DEFAULT);
 
 	if (qd->is_show_news) {
-		purple_notify_info(gc, NULL, _("QQ Server News"), content_utf8);
+		purple_notify_info(gc, _("QQ Server News"), title_utf8, content_utf8);
 	} else {
-		purple_debug_info("QQ", "QQ Server news:\n%s", content_utf8);
+		purple_debug_info("QQ", "QQ Server news:\n%s\n%s", title_utf8, content_utf8);
 	}
 	g_free(title);
+	g_free(title_utf8);
 	g_free(brief);
 	g_free(url);
 	g_free(content);