Mercurial > pidgin.yaz
diff console/gntconv.c @ 14011:735c4e927eb8
[gaim-migrate @ 16603]
wabz says: "gaim_strdup_withhtml in util.c is purely for converting
linebreaks to <br> - some protocols use it for various reasons, but not msn
- not sure where it's done for that (might not be? gtkconv doesnt use
gaim_markup_strip_html). i reckon since you're using
gaim_markup_strip_html, you may as well play it safe and just use
gaim_strdup_withhtml before the strip?"
So let's do it until GntTextView can parse html. (after all, that's 20% of
the users ;) )
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 31 Jul 2006 23:56:35 +0000 |
parents | 7573bd40a190 |
children | 7109e6397a31 |
line wrap: on
line diff
--- a/console/gntconv.c Mon Jul 31 23:19:12 2006 +0000 +++ b/console/gntconv.c Mon Jul 31 23:56:35 2006 +0000 @@ -216,7 +216,7 @@ GaimMessageFlags flags, time_t mtime) { GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); /* XXX: ggconv = conv->ui_data; should do */ - char *strip; + char *strip, *newline; GntTextFormatFlags fl = 0; g_return_if_fail(ggconv != NULL); @@ -236,12 +236,15 @@ if (flags & GAIM_MESSAGE_NICK) fl |= GNT_TEXT_FLAG_UNDERLINE; - strip = gaim_markup_strip_html(message); + /* XXX: Remove this workaround when textview can parse messages. */ + newline = gaim_strdup_withhtml(message); + strip = gaim_markup_strip_html(newline); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), strip, fl); gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); + g_free(newline); g_free(strip); if (flags & (GAIM_MESSAGE_RECV | GAIM_MESSAGE_NICK | GAIM_MESSAGE_ERROR))