Comment 17 for bug 538504

Revision history for this message
Benjamin Drung (bdrung) wrote : Re: [UIFe] transmission measures bandwidth in KB/s instead of kB/s

I'm now realizing the problem of g_format_size_for_display() + "/s". I have a new approach to that.

What upstream can do: Use bytes internally and write/use some helper functions for inputting/displaying them:
* bandwidth_unit(): Return a string containing the bandwidth unit (e.g. "KB/s")
* input_bandwidth_to_byte(size): Converts the input value to bytes (e.g. size * 1024)

Then we can write a small patch for Ubuntu that modifies these two functions:
* bandwidth_unit(): Return "kB/s"
* input_bandwidth_to_byte(size): Return size * 1000

Anything that I forgot?

@Martin: If we drop the g_format_size_for_display() patch, we have to patch all applications that use this function to comply with our policy.