aboutsummaryrefslogtreecommitdiff
path: root/libsylph/utils.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-05 13:11:13 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-05 13:11:13 +0000
commitd6efc2451b025f596253032b5547c974cf1f515f (patch)
tree352b789fb8f4f90b3b6332dd8258499d82e6a1ca /libsylph/utils.c
parent2ba20d1ef121661b16f9592bf1185dc9be827d84 (diff)
fixed wrong status display at receiving on *BSD systems.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@975 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r--libsylph/utils.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c
index e6703186..e99f3d3a 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -269,16 +269,16 @@ gchar *itos(gint n)
gchar *to_human_readable(gint64 size)
{
- static gchar str[10];
+ static gchar str[16];
if (size < 1024)
- g_snprintf(str, sizeof(str), _("%dB"), (gint)size);
- else if (size >> 10 < 1024)
- g_snprintf(str, sizeof(str), _("%.1fKB"), (gfloat)size / (1 << 10));
- else if (size >> 20 < 1024)
- g_snprintf(str, sizeof(str), _("%.2fMB"), (gfloat)size / (1 << 20));
+ g_snprintf(str, sizeof(str), "%dB", (gint)size);
+ else if ((size >> 10) < 1024)
+ g_snprintf(str, sizeof(str), "%.1fKB", (gfloat)size / (1 << 10));
+ else if ((size >> 20) < 1024)
+ g_snprintf(str, sizeof(str), "%.2fMB", (gfloat)size / (1 << 20));
else
- g_snprintf(str, sizeof(str), _("%.2fGB"), (gfloat)size / (1 << 30));
+ g_snprintf(str, sizeof(str), "%.2fGB", (gfloat)size / (1 << 30));
return str;
}