diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-13 09:42:26 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-07-13 09:42:26 +0000 |
commit | 70a2615d616d6c29275cfe836678c03b78f802f4 (patch) | |
tree | f55becc5b8e2baf0e904332aa87d526823a5f868 /src/textview.c | |
parent | 3083452938b15891e80313f14be554dd22ce933e (diff) |
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
Diffstat (limited to 'src/textview.c')
-rw-r--r-- | src/textview.c | 10 |
1 files changed, 6 insertions, 4 deletions
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) { |