Unit of Measure

Feature requests for the GTK+ version of Transmission
dzidzitop
Posts: 8
Joined: Sun Dec 23, 2012 9:58 pm

Unit of Measure

Postby dzidzitop » Sun Dec 23, 2012 10:03 pm

Why the Transmission UI (I use Transmission GTK v2.52 b13304) displays sizes as follows:
- KB = 1000 B
- MB = 1000 000 B
- GB = 1000 000 000 B

I think that instead it should display normal KiB, MiB, GiB units which are based on powers of 2. Current size representation is misleading.
I'd be pleased to see:
- KiB = 2^10 B
- MiB = 2^20 B
- GiB = 2^30 B

In addition, the download/upload rates are displayed as kB which does not conform with the size units displayed as KB.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Unit of Measure

Postby rb07 » Mon Dec 24, 2012 7:50 pm

That's an old change, triggered by a request just like yours, see Ticket #3174.

Actually its a bunch of tickets, #4057, #3045, and the dreaded #4703.

dzidzitop
Posts: 8
Joined: Sun Dec 23, 2012 9:58 pm

Re: Unit of Measure

Postby dzidzitop » Tue Dec 25, 2012 9:04 am

This seems to be a neverending issue.

It should be either:
- clearly stated that 2^y or 10^x units are used and commented in the code so that there are no attempts to "fix" this again and again
or
- made configurable application-wide

I understand HDD manufacturers who use the powers of 10 to make their disks look larger but software uses the powers of 2 (mac is religion, not software).

The fix should be very easy: https://trac.transmissionbt.com/browser ... gtk/util.c

const int mem_K = 1024;
const char * mem_K_str = N_("KiB");
const char * mem_M_str = N_("MiB");
const char * mem_G_str = N_("GiB");
const char * mem_T_str = N_("TiB");

const int disk_K = 1000;
const char * disk_K_str = N_("kB");
const char * disk_M_str = N_("MB");
const char * disk_G_str = N_("GB");
const char * disk_T_str = N_("TB");

const int speed_K = 1000;
const char * speed_K_str = N_("kB/s");
const char * speed_M_str = N_("MB/s");
const char * speed_G_str = N_("GB/s");
const char * speed_T_str = N_("TB/s");


Return to “GTK+ Requests”