(trunk) #3045 "size units" -- sync the default units in all the apps s.t. they're consistent with each other
This commit is contained in:
parent
914af1c9f8
commit
e6bafdf26b
24
cli/cli.c
24
cli/cli.c
|
@ -45,19 +45,19 @@
|
|||
#define MEM_G_STR "GiB"
|
||||
#define MEM_T_STR "TiB"
|
||||
|
||||
#define DISK_K 1000
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "kB"
|
||||
#define DISK_M_STR "MB"
|
||||
#define DISK_G_STR "GB"
|
||||
#define DISK_T_STR "TB"
|
||||
#define DISK_K 1024
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "KiB"
|
||||
#define DISK_M_STR "MiB"
|
||||
#define DISK_G_STR "GiB"
|
||||
#define DISK_T_STR "TiB"
|
||||
|
||||
#define SPEED_K 1000
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "kB/s"
|
||||
#define SPEED_M_STR "MB/s"
|
||||
#define SPEED_G_STR "GB/s"
|
||||
#define SPEED_T_STR "TB/s"
|
||||
#define SPEED_K 1024
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "KiB/s"
|
||||
#define SPEED_M_STR "MiB/s"
|
||||
#define SPEED_G_STR "GiB/s"
|
||||
#define SPEED_T_STR "TiB/s"
|
||||
|
||||
/***
|
||||
****
|
||||
|
|
|
@ -47,19 +47,19 @@
|
|||
#define MEM_G_STR "GiB"
|
||||
#define MEM_T_STR "TiB"
|
||||
|
||||
#define DISK_K 1000
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "kB"
|
||||
#define DISK_M_STR "MB"
|
||||
#define DISK_G_STR "GB"
|
||||
#define DISK_T_STR "TB"
|
||||
#define DISK_K 1024
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "KiB"
|
||||
#define DISK_M_STR "MiB"
|
||||
#define DISK_G_STR "GiB"
|
||||
#define DISK_T_STR "TiB"
|
||||
|
||||
#define SPEED_K 1000
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "kB/s"
|
||||
#define SPEED_M_STR "MB/s"
|
||||
#define SPEED_G_STR "GB/s"
|
||||
#define SPEED_T_STR "TB/s"
|
||||
#define SPEED_K 1024
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "KiB/s"
|
||||
#define SPEED_M_STR "MiB/s"
|
||||
#define SPEED_G_STR "GiB/s"
|
||||
#define SPEED_T_STR "TiB/s"
|
||||
|
||||
static tr_bool paused = FALSE;
|
||||
static tr_bool closing = FALSE;
|
||||
|
|
|
@ -44,24 +44,25 @@
|
|||
#define ARGUMENTS "arguments"
|
||||
|
||||
#define MEM_K 1024
|
||||
#define MEM_B_STR "B"
|
||||
#define MEM_K_STR "KiB"
|
||||
#define MEM_M_STR "MiB"
|
||||
#define MEM_G_STR "GiB"
|
||||
#define MEM_T_STR "TiB"
|
||||
|
||||
#define DISK_K 1000
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "kB"
|
||||
#define DISK_M_STR "MB"
|
||||
#define DISK_G_STR "GB"
|
||||
#define DISK_T_STR "TB"
|
||||
#define DISK_K 1024
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "KiB"
|
||||
#define DISK_M_STR "MiB"
|
||||
#define DISK_G_STR "GiB"
|
||||
#define DISK_T_STR "TiB"
|
||||
|
||||
#define SPEED_K 1000
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "kB/s"
|
||||
#define SPEED_M_STR "MB/s"
|
||||
#define SPEED_G_STR "GB/s"
|
||||
#define SPEED_T_STR "TB/s"
|
||||
#define SPEED_K 1024
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "KiB/s"
|
||||
#define SPEED_M_STR "MiB/s"
|
||||
#define SPEED_G_STR "GiB/s"
|
||||
#define SPEED_T_STR "TiB/s"
|
||||
|
||||
/***
|
||||
****
|
||||
|
|
10
gtk/util.c
10
gtk/util.c
|
@ -59,11 +59,11 @@ const char * disk_M_str = N_("MiB");
|
|||
const char * disk_G_str = N_("GiB");
|
||||
const char * disk_T_str = N_("TiB");
|
||||
|
||||
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");
|
||||
const int speed_K = 1024;
|
||||
const char * speed_K_str = N_("KiB/s");
|
||||
const char * speed_M_str = N_("MiB/s");
|
||||
const char * speed_G_str = N_("GiB/s");
|
||||
const char * speed_T_str = N_("TiB/s");
|
||||
|
||||
/***
|
||||
****
|
||||
|
|
|
@ -34,24 +34,24 @@ QString Formatter::unitStrings[3][5];
|
|||
void
|
||||
Formatter :: initUnits( )
|
||||
{
|
||||
speed_K = 1000;
|
||||
unitStrings[SPEED][B] = tr( "B/s" );
|
||||
unitStrings[SPEED][KB] = tr( "kB/s" );
|
||||
unitStrings[SPEED][MB] = tr( "MB/s" );
|
||||
unitStrings[SPEED][GB] = tr( "GB/s" );
|
||||
unitStrings[SPEED][TB] = tr( "TB/s" );
|
||||
speed_K = 1024;
|
||||
unitStrings[SPEED][B] = tr( "B/s" );
|
||||
unitStrings[SPEED][KB] = tr( "KiB/s" );
|
||||
unitStrings[SPEED][MB] = tr( "MiB/s" );
|
||||
unitStrings[SPEED][GB] = tr( "GiB/s" );
|
||||
unitStrings[SPEED][TB] = tr( "TiB/s" );
|
||||
tr_formatter_speed_init( speed_K,
|
||||
qPrintable( unitStrings[SPEED][KB] ),
|
||||
qPrintable( unitStrings[SPEED][MB] ),
|
||||
qPrintable( unitStrings[SPEED][GB] ),
|
||||
qPrintable( unitStrings[SPEED][TB] ) );
|
||||
|
||||
size_K = 1000;
|
||||
unitStrings[SIZE][B] = tr( "B" );
|
||||
unitStrings[SIZE][KB] = tr( "KB" );
|
||||
unitStrings[SIZE][MB] = tr( "MB" );
|
||||
unitStrings[SIZE][GB] = tr( "GB" );
|
||||
unitStrings[SIZE][TB] = tr( "TB" );
|
||||
size_K = 1024;
|
||||
unitStrings[SIZE][B] = tr( "B" );
|
||||
unitStrings[SIZE][KB] = tr( "KiB" );
|
||||
unitStrings[SIZE][MB] = tr( "MiB" );
|
||||
unitStrings[SIZE][GB] = tr( "GiB" );
|
||||
unitStrings[SIZE][TB] = tr( "TiB" );
|
||||
tr_formatter_size_init( size_K,
|
||||
qPrintable( unitStrings[SIZE][KB] ),
|
||||
qPrintable( unitStrings[SIZE][MB] ),
|
||||
|
|
20
utils/show.c
20
utils/show.c
|
@ -34,19 +34,19 @@
|
|||
#define MEM_G_STR "GiB"
|
||||
#define MEM_T_STR "TiB"
|
||||
|
||||
#define DISK_K 1000
|
||||
#define DISK_K 1024
|
||||
#define DISK_B_STR "B"
|
||||
#define DISK_K_STR "kB"
|
||||
#define DISK_M_STR "MB"
|
||||
#define DISK_G_STR "GB"
|
||||
#define DISK_T_STR "TB"
|
||||
#define DISK_K_STR "KiB"
|
||||
#define DISK_M_STR "MiB"
|
||||
#define DISK_G_STR "GiB"
|
||||
#define DISK_T_STR "TiB"
|
||||
|
||||
#define SPEED_K 1000
|
||||
#define SPEED_K 1024
|
||||
#define SPEED_B_STR "B/s"
|
||||
#define SPEED_K_STR "kB/s"
|
||||
#define SPEED_M_STR "MB/s"
|
||||
#define SPEED_G_STR "GB/s"
|
||||
#define SPEED_T_STR "TB/s"
|
||||
#define SPEED_K_STR "KiB/s"
|
||||
#define SPEED_M_STR "MiB/s"
|
||||
#define SPEED_G_STR "GiB/s"
|
||||
#define SPEED_T_STR "TiB/s"
|
||||
|
||||
static tr_option options[] =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue