From 70a2615d616d6c29275cfe836678c03b78f802f4 Mon Sep 17 00:00:00 2001 From: hiro Date: Wed, 13 Jul 2005 09:42:26 +0000 Subject: made the file size of attachments more accurate, and human-readable. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@427 ee746299-78ed-0310-b773-934348b2243d --- src/textview.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/textview.c') diff --git a/src/textview.c b/src/textview.c index 2123f8ba..a0332c84 100644 --- a/src/textview.c +++ b/src/textview.c @@ -620,13 +620,15 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp) else #endif if (mimeinfo->filename || mimeinfo->name) - g_snprintf(buf, sizeof(buf), "\n[%s %s (%d bytes)]\n", + g_snprintf(buf, sizeof(buf), "\n[%s %s (%s)]\n", mimeinfo->filename ? mimeinfo->filename : mimeinfo->name, - mimeinfo->content_type, mimeinfo->size); + mimeinfo->content_type, + to_human_readable(mimeinfo->content_size)); else - g_snprintf(buf, sizeof(buf), "\n[%s (%d bytes)]\n", - mimeinfo->content_type, mimeinfo->size); + g_snprintf(buf, sizeof(buf), "\n[%s (%s)]\n", + mimeinfo->content_type, + to_human_readable(mimeinfo->content_size)); #if USE_GPGME if (mimeinfo->sigstatus) { -- cgit v1.2.3