summaryrefslogtreecommitdiff
path: root/src/trg-main-window.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-02 14:14:41 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-02 14:14:41 +0000
commitcd3800287297bdcd9fb8c90ee01a2414be3b9312 (patch)
tree93c4718a5f8dab79f9fd3c0af22c7ab1fc892a26 /src/trg-main-window.c
parent8259ceddd02f76a337bb7037cdf5b86872ad09c6 (diff)
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.
Diffstat (limited to 'src/trg-main-window.c')
-rw-r--r--src/trg-main-window.c6
1 files changed, 1 insertions, 5 deletions
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);