talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 3ee9de9029f44ea808975fd049805690f7613529
parent cc0a3a5cb8d80d0d339a149bf956a72b85251e97
Author: Colin Leroy <colin@colino.net>
Date:   Mon,  5 May 2014 17:24:09 +0200

revert erroneous 2b0b467727d110b8505517bd92261608e499f57f; we need
this differenciation to show attachments

Diffstat:
Msrc/textview.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/textview.c b/src/textview.c @@ -636,7 +636,15 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp) textview_clear(textview); - textview_add_parts(textview, mimeinfo); + if (mimeinfo->type == MIMETYPE_MULTIPART || + (mimeinfo->type == MIMETYPE_MESSAGE && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822"))) { + textview_add_parts(textview, mimeinfo); + } else { + if (fseek(fp, mimeinfo->offset, SEEK_SET) < 0) + perror("fseek"); + + textview_write_body(textview, mimeinfo); + } textview->loading = FALSE; textview->stop_loading = FALSE; @@ -797,7 +805,7 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo) END_TIMING(); GTK_EVENTS_FLUSH(); } - } else { + } else if (mimeinfo->type == MIMETYPE_TEXT) { if (prefs_common.display_header && (charcount > 0)) gtk_text_buffer_insert(buffer, &iter, "\n", 1);