Use petabytes when appropriate

This commit is contained in:
Pierre Pronchery 2018-04-22 00:17:55 +02:00
parent 7308c4884b
commit d072fa1c78
3 changed files with 9 additions and 3 deletions

View File

@ -258,10 +258,12 @@ static char const * _common_size(off_t size)
unit = N_("MB");
else if((sz /= 1024) < 1024)
unit = N_("GB");
else if((sz /= 1024) < 1024)
unit = N_("TB");
else
{
sz /= 1024;
unit = N_("TB");
unit = N_("PB");
}
snprintf(buf, sizeof(buf), "%.1f %s", sz, _(unit));
return buf;

View File

@ -553,10 +553,12 @@ static void _refresh_size(Properties * properties, size_t size)
unit = _("MB");
else if((sz /= 1024) < 1024)
unit = _("GB");
else if((sz /= 1024) < 1024)
unit = _("TB");
else
{
sz /= 1024;
unit = _("TB");
unit = _("PB");
}
snprintf(buf, sizeof(buf), format, sz, unit);
gtk_label_set_text(GTK_LABEL(properties->size), buf);

View File

@ -545,10 +545,12 @@ static void _list_add_size(char * buf, size_t len, unsigned long bsize,
unit = _("MB");
else if((sz /= 1024) < 1024)
unit = _("GB");
else if((sz /= 1024) < 1024)
unit = _("TB");
else
{
sz /= 1024;
unit = _("TB");
unit = _("PB");
}
snprintf(buf, len, format, sz, unit);
}