From: Colin Leroy Date: Mon, 5 May 2014 15:24:09 +0000 (+0200) Subject: revert erroneous 2b0b467727d110b8505517bd92261608e499f57f; we need X-Git-Tag: 3.10.0~64 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=3ee9de9029f44ea808975fd049805690f7613529;hp=cc0a3a5cb8d80d0d339a149bf956a72b85251e97 revert erroneous 2b0b467727d110b8505517bd92261608e499f57f; we need this differenciation to show attachments --- diff --git a/src/textview.c b/src/textview.c index 2d027c2fe..9131f91f2 100644 --- 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);