summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-21 00:32:54 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-21 00:32:54 +0000
commitec64e995ab1467596e75fb0aebda63bb047aefa5 (patch)
tree07d4d1f73b33085b8f87d9c0ae56a2548a1bc9be /src/util.c
parent980ecb422cb29f93f5fe51b633be46cde36cedc6 (diff)
file trees :D may do cascading priority changes sometime, but this is a start. also use GTK_STOCK_FILE if mime/extension detection fails.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/util.c b/src/util.c
index 8b31487..b103cff 100644
--- a/src/util.c
+++ b/src/util.c
@@ -176,31 +176,11 @@ char *tr_strlsize(char *buf, guint64 size, size_t buflen)
{
if (!size)
g_strlcpy(buf, _("None"), buflen);
-#if GLIB_CHECK_VERSION( 2, 16, 0 )
else {
char *tmp = g_format_size_for_display(size);
g_strlcpy(buf, tmp, buflen);
g_free(tmp);
}
-#else
- else if (size < (guint64) KILOBYTE_FACTOR)
- g_snprintf(buf, buflen,
- ngettext("%'u byte", "%'u bytes", (guint) size),
- (guint) size);
- else {
- gdouble displayed_size;
- if (size < (guint64) MEGABYTE_FACTOR) {
- displayed_size = (gdouble) size / KILOBYTE_FACTOR;
- g_snprintf(buf, buflen, _("%'.1f KB"), displayed_size);
- } else if (size < (guint64) GIGABYTE_FACTOR) {
- displayed_size = (gdouble) size / MEGABYTE_FACTOR;
- g_snprintf(buf, buflen, _("%'.1f MB"), displayed_size);
- } else {
- displayed_size = (gdouble) size / GIGABYTE_FACTOR;
- g_snprintf(buf, buflen, _("%'.1f GB"), displayed_size);
- }
- }
-#endif
return buf;
}