[Xfce4-commits] <xfce4-netload-plugin:master> Never display B/s values in panel, start with KiB/s
Mike Massonnet
noreply at xfce.org
Fri Jan 13 12:08:01 CET 2012
Updating branch refs/heads/master
to a331712b49e66b53de8fe0300f46e352ab847314 (commit)
from 713440369aebf9ec82e56ad6c434ea6dc042b765 (commit)
commit a331712b49e66b53de8fe0300f46e352ab847314
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Fri Jan 13 12:01:55 2012 +0100
Never display B/s values in panel, start with KiB/s
panel-plugin/utils.c | 4 ++--
1 files 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();
More information about the Xfce4-commits
mailing list