From b0599ba78876b0df38fd73758dee515cbe95b30e Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 8 Aug 2005 09:30:54 +0000 Subject: [PATCH] kilobyte megabyte etc is 1000 and not 1024. we could use KiB MiB if we want for 1024. more http://en.wikipedia.org/wiki/Kibibyte --- src/gtkgui_helpers.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 2d768d8c0..022d5b6d6 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -29,17 +29,15 @@ _ = i18n._ from common import gajim - - def convert_bytes(string): suffix = '' bytes = int(string) - if bytes >= 1024: - bytes = round(bytes/1024.,1) - if bytes >= 1024: - bytes = round(bytes/1024.,1) - if bytes >= 1024: - bytes = round(bytes/1024.,1) + if bytes >= 1000: + bytes = round(bytes/1000., 1) + if bytes >= 1000: + bytes = round(bytes/1000., 1) + if bytes >= 1000: + bytes = round(bytes/1000., 1) #Gb means giga bytes suffix = _('%s Gb') else: