From 026600472ebc423835f1cc236b2b4c935a544ccb Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 8 Feb 2010 16:11:37 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 14183e9d9367b240b6e0585031a87772c952285a Monotone-Revision: 50e173285f95163a8c7af77f9550d24a75d046e5 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-02-08T16:11:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/MailerUI/UIxMailListView.m | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 256421b53..0ad1c20c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-08 Francis Lachapelle + + * UI/MailerUI/UIxMailListView.m (-messageSize): improved + formatting of message size. + 2010-02-03 Wolfgang Sourdeau * UI/MainUI/SOGoRootPage.m (-_standardDefaultAction): add an diff --git a/UI/MailerUI/UIxMailListView.m b/UI/MailerUI/UIxMailListView.m index 5358165c1..404b25cc7 100644 --- a/UI/MailerUI/UIxMailListView.m +++ b/UI/MailerUI/UIxMailListView.m @@ -119,9 +119,13 @@ int size; size = [[message valueForKey: @"size"] intValue]; - - rc = [NSString stringWithFormat: @"%dK", size/1024]; - + if (size > 1024*1024) + rc = [NSString stringWithFormat: @"%.1f MB", (float) size/1024/1024]; + else if (size > 1024*100) + rc = [NSString stringWithFormat: @"%d KB", size/1024]; + else + rc = [NSString stringWithFormat: @"%.1f KB", (float) size/1024]; + return rc; }