From cd3800287297bdcd9fb8c90ee01a2414be3b9312 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Mon, 2 Jan 2012 14:14:41 +0000 Subject: change units to the IEC standard (and the Ubuntu units policy) for base2 (/1024) - KiB/GiB etc. this is instead of KB/s etc which Windows and many other apps use for base2. I've tried to fix up the translations as best as I can. --- src/trg-main-window.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/trg-main-window.c') diff --git a/src/trg-main-window.c b/src/trg-main-window.c index ee49419..8ad7f3a 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -1745,14 +1745,10 @@ static GtkWidget *limit_item_new(TrgMainWindow * win, GtkWidget * menu, GtkWidget *item; gboolean active = limit < 0 ? FALSE : (currentLimit == (gint64) limit); - if (limit >= 1000) - g_snprintf(speed, sizeof(speed), "%.2f MB/s", limit / 1024); - else - g_snprintf(speed, sizeof(speed), "%.0f KB/s", limit); + trg_strlspeed(speed, limit); item = gtk_check_menu_item_new_with_label(speed); - /* Yeah, I know it's unsafe to cast from a float to an int, but its safe here */ g_object_set_data(G_OBJECT(item), "limit", GINT_TO_POINTER((gint) limit)); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), active); -- cgit v1.2.3