From a331712b49e66b53de8fe0300f46e352ab847314 Mon Sep 17 00:00:00 2001 From: Mike Massonnet Date: Fri, 13 Jan 2012 12:01:55 +0100 Subject: [PATCH] Never display B/s values in panel, start with KiB/s --- panel-plugin/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/utils.c b/panel-plugin/utils.c index 53c9b1f..30647af 100644 --- a/panel-plugin/utils.c +++ b/panel-plugin/utils.c @@ -76,8 +76,8 @@ char* format_byte_humanreadable(char* string, int stringsize, double number, int char buffer[BUFSIZ], formatstring[BUFSIZ]; char* bufptr = buffer; char* unit_names[] = { N_("B"), N_("KiB"), N_("MiB"), N_("GiB") }; - unsigned int uidx = 0; - double number_displayed = number; + unsigned int uidx = 1; + double number_displayed = number / 1024.0; unsigned int i; int numberOfIntegerChars, count; struct lconv* localeinfo = localeconv();