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; }