diff libpurple/conversation.c @ 27737:a9cb48039d3b

propagate from branch 'im.pidgin.pidgin' (head 2c3b326b7734ae5211bccc072469632b5b560151) to branch 'im.pidgin.pidgin.yaz' (head 84cfaa9f49f4017d8e890978ae333a7323a51062)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 24 Nov 2007 05:42:55 +0000
parents 98604b4bfa3b
children 54479172725e
line wrap: on
line diff
--- a/libpurple/conversation.c	Fri Nov 23 19:42:47 2007 +0000
+++ b/libpurple/conversation.c	Sat Nov 24 05:42:55 2007 +0000
@@ -1142,17 +1142,27 @@
 			  PurpleMessageFlags flags, time_t mtime)
 {
 	PurpleConversation *c;
+	char *tmpmessage = NULL;
 
 	g_return_if_fail(im != NULL);
 	g_return_if_fail(message != NULL);
 
 	c = purple_conv_im_get_conversation(im);
 
+	// yaz
+	if (purple_prefs_get_bool("/purple/conversations/msnstyle")) {
+		tmpmessage = g_strdup_printf("<br>%s", message);
+	} else {
+		tmpmessage = g_strdup_printf("%s", message);
+	}
+
 	/* Pass this on to either the ops structure or the default write func. */
 	if (c->ui_ops != NULL && c->ui_ops->write_im != NULL)
-		c->ui_ops->write_im(c, who, message, flags, mtime);
+		c->ui_ops->write_im(c, who, tmpmessage, flags, mtime);
 	else
-		purple_conversation_write(c, who, message, flags, mtime);
+		purple_conversation_write(c, who, tmpmessage, flags, mtime);
+
+	g_free(tmpmessage);
 }
 
 gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)