MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_format_pretty_size

Function ghb_format_pretty_size

gtk/src/util.c:272–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272char *
273ghb_format_pretty_size (int64_t bytes)
274{
275 double kilobytes = bytes / 1000;
276 double megabytes = kilobytes / 1000;
277 double gigabytes = megabytes / 1000;
278 if (gigabytes != 0)
279 {
280 return g_strdup_printf("%0.1f %s", gigabytes, _("GB"));
281 }
282 else if (megabytes != 0)
283 {
284 return g_strdup_printf(_("%0.1f %s"), megabytes, _("MB"));
285 }
286 else
287 {
288 return g_strdup_printf(_("%0.1f %s"), kilobytes, _("KB"));
289 }
290}

Callers 2

notify_pausedFunction · 0.85
ghb_low_disk_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected