diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 13f8627..6863cc4 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -1710,10 +1710,6 @@ g_build_filename (const gchar *first_element,
   return str;
 }
 
-#define KILOBYTE_FACTOR 1024.0
-#define MEGABYTE_FACTOR (1024.0 * 1024.0)
-#define GIGABYTE_FACTOR (1024.0 * 1024.0 * 1024.0)
-
 /**
  * g_format_size_for_display:
  * @size: a size in bytes.
@@ -1735,31 +1731,44 @@ g_build_filename (const gchar *first_element,
 char *
 g_format_size_for_display (goffset size)
 {
-  if (size < (goffset) KILOBYTE_FACTOR)
-    return g_strdup_printf (g_dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size);
+  guint i, decimals; 
+  gdouble displayed_size = (gdouble) size;
+  
+  const gchar* sizes[] = 
+  {
+	N_("%.*f bytes"),
+	N_("%.*f Kb"),
+	N_("%.*f MB"),
+	N_("%.*f GB"),
+	N_("%.*f TB"),
+	N_("%.*f PB"),
+	N_("%.*f EB"),
+	N_("%.*f ZB"),
+	N_("%.*f YB")
+  };
+  
+  for (i = 0; displayed_size >= 1024 && i < G_N_ELEMENTS(sizes); i++)
+  {
+	  displayed_size /= 1024;
+  }
+  
+  if(displayed_size <= 9)
+  {
+	  decimals = 2;
+  }
+  else if(displayed_size <= 99)
+  {
+	  decimals = 1;
+  }
   else
-    {
-      gdouble displayed_size;
-      
-      if (size < (goffset) MEGABYTE_FACTOR)
-	{
-	  displayed_size = (gdouble) size / KILOBYTE_FACTOR;
-	  return g_strdup_printf (_("%.1f KB"), displayed_size);
-	}
-      else if (size < (goffset) GIGABYTE_FACTOR)
-	{
-	  displayed_size = (gdouble) size / MEGABYTE_FACTOR;
-	  return g_strdup_printf (_("%.1f MB"), displayed_size);
-	}
-      else
-	{
-	  displayed_size = (gdouble) size / GIGABYTE_FACTOR;
-	  return g_strdup_printf (_("%.1f GB"), displayed_size);
-	}
-    }
+  {
+	  decimals = 0;
+  }
+  
+  return g_strdup_printf (_(sizes[i]), decimals, displayed_size);
+  
 }
 
-
 /**
  * g_file_read_link:
  * @filename: the symbolic link
