Changeset 11060


Ignore:
Timestamp:
Jul 28, 2010, 12:31:11 AM (12 years ago)
Author:
charles
Message:

(trunk) #3045 "size units" -- sync the default units in all the apps s.t. they're consistent with each other

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/cli.c

    r10955 r11060  
    4646#define MEM_T_STR "TiB"
    4747
    48 #define DISK_K 1000
    49 #define DISK_B_STR "B"
    50 #define DISK_K_STR "kB"
    51 #define DISK_M_STR "MB"
    52 #define DISK_G_STR "GB"
    53 #define DISK_T_STR "TB"
    54 
    55 #define SPEED_K 1000
    56 #define SPEED_B_STR "B/s"
    57 #define SPEED_K_STR "kB/s"
    58 #define SPEED_M_STR "MB/s"
    59 #define SPEED_G_STR "GB/s"
    60 #define SPEED_T_STR "TB/s"
     48#define DISK_K 1024
     49#define DISK_B_STR   "B"
     50#define DISK_K_STR "KiB"
     51#define DISK_M_STR "MiB"
     52#define DISK_G_STR "GiB"
     53#define DISK_T_STR "TiB"
     54
     55#define SPEED_K 1024
     56#define SPEED_B_STR   "B/s"
     57#define SPEED_K_STR "KiB/s"
     58#define SPEED_M_STR "MiB/s"
     59#define SPEED_G_STR "GiB/s"
     60#define SPEED_T_STR "TiB/s"
    6161
    6262/***
  • trunk/daemon/daemon.c

    r10969 r11060  
    4848#define MEM_T_STR "TiB"
    4949
    50 #define DISK_K 1000
    51 #define DISK_B_STR "B"
    52 #define DISK_K_STR "kB"
    53 #define DISK_M_STR "MB"
    54 #define DISK_G_STR "GB"
    55 #define DISK_T_STR "TB"
    56 
    57 #define SPEED_K 1000
    58 #define SPEED_B_STR "B/s"
    59 #define SPEED_K_STR "kB/s"
    60 #define SPEED_M_STR "MB/s"
    61 #define SPEED_G_STR "GB/s"
    62 #define SPEED_T_STR "TB/s"
     50#define DISK_K 1024
     51#define DISK_B_STR   "B"
     52#define DISK_K_STR "KiB"
     53#define DISK_M_STR "MiB"
     54#define DISK_G_STR "GiB"
     55#define DISK_T_STR "TiB"
     56
     57#define SPEED_K 1024
     58#define SPEED_B_STR   "B/s"
     59#define SPEED_K_STR "KiB/s"
     60#define SPEED_M_STR "MiB/s"
     61#define SPEED_G_STR "GiB/s"
     62#define SPEED_T_STR "TiB/s"
    6363
    6464static tr_bool paused = FALSE;
  • trunk/daemon/remote.c

    r11048 r11060  
    4545
    4646#define MEM_K 1024
     47#define MEM_B_STR   "B"
    4748#define MEM_K_STR "KiB"
    4849#define MEM_M_STR "MiB"
     
    5051#define MEM_T_STR "TiB"
    5152
    52 #define DISK_K 1000
    53 #define DISK_B_STR "B"
    54 #define DISK_K_STR "kB"
    55 #define DISK_M_STR "MB"
    56 #define DISK_G_STR "GB"
    57 #define DISK_T_STR "TB"
    58 
    59 #define SPEED_K 1000
    60 #define SPEED_B_STR "B/s"
    61 #define SPEED_K_STR "kB/s"
    62 #define SPEED_M_STR "MB/s"
    63 #define SPEED_G_STR "GB/s"
    64 #define SPEED_T_STR "TB/s"
     53#define DISK_K 1024
     54#define DISK_B_STR   "B"
     55#define DISK_K_STR "KiB"
     56#define DISK_M_STR "MiB"
     57#define DISK_G_STR "GiB"
     58#define DISK_T_STR "TiB"
     59
     60#define SPEED_K 1024
     61#define SPEED_B_STR   "B/s"
     62#define SPEED_K_STR "KiB/s"
     63#define SPEED_M_STR "MiB/s"
     64#define SPEED_G_STR "GiB/s"
     65#define SPEED_T_STR "TiB/s"
    6566
    6667/***
  • trunk/gtk/util.c

    r11045 r11060  
    6060const char * disk_T_str = N_("TiB");
    6161
    62 const int speed_K = 1000;
    63 const char * speed_K_str = N_("kB/s");
    64 const char * speed_M_str = N_("MB/s");
    65 const char * speed_G_str = N_("GB/s");
    66 const char * speed_T_str = N_("TB/s");
     62const int speed_K = 1024;
     63const char * speed_K_str = N_("KiB/s");
     64const char * speed_M_str = N_("MiB/s");
     65const char * speed_G_str = N_("GiB/s");
     66const char * speed_T_str = N_("TiB/s");
    6767
    6868/***
  • trunk/qt/formatter.cc

    r11054 r11060  
    3535Formatter :: initUnits( )
    3636{
    37     speed_K = 1000;
    38     unitStrings[SPEED][B]  = tr(  "B/s" );
    39     unitStrings[SPEED][KB] = tr( "kB/s" );
    40     unitStrings[SPEED][MB] = tr( "MB/s" );
    41     unitStrings[SPEED][GB] = tr( "GB/s" );
    42     unitStrings[SPEED][TB] = tr( "TB/s" );
     37    speed_K = 1024;
     38    unitStrings[SPEED][B]  = tr(   "B/s" );
     39    unitStrings[SPEED][KB] = tr( "KiB/s" );
     40    unitStrings[SPEED][MB] = tr( "MiB/s" );
     41    unitStrings[SPEED][GB] = tr( "GiB/s" );
     42    unitStrings[SPEED][TB] = tr( "TiB/s" );
    4343    tr_formatter_speed_init( speed_K,
    4444                             qPrintable( unitStrings[SPEED][KB] ),
     
    4747                             qPrintable( unitStrings[SPEED][TB] ) );
    4848
    49     size_K = 1000;
    50     unitStrings[SIZE][B]  = tr(  "B" );
    51     unitStrings[SIZE][KB] = tr( "KB" );
    52     unitStrings[SIZE][MB] = tr( "MB" );
    53     unitStrings[SIZE][GB] = tr( "GB" );
    54     unitStrings[SIZE][TB] = tr( "TB" );
     49    size_K = 1024;
     50    unitStrings[SIZE][B]  = tr(   "B" );
     51    unitStrings[SIZE][KB] = tr( "KiB" );
     52    unitStrings[SIZE][MB] = tr( "MiB" );
     53    unitStrings[SIZE][GB] = tr( "GiB" );
     54    unitStrings[SIZE][TB] = tr( "TiB" );
    5555    tr_formatter_size_init( size_K,
    5656                            qPrintable( unitStrings[SIZE][KB] ),
  • trunk/utils/show.c

    r10960 r11060  
    3535#define MEM_T_STR "TiB"
    3636
    37 #define DISK_K 1000
     37#define DISK_K 1024
    3838#define DISK_B_STR "B"
    39 #define DISK_K_STR "kB"
    40 #define DISK_M_STR "MB"
    41 #define DISK_G_STR "GB"
    42 #define DISK_T_STR "TB"
    43 
    44 #define SPEED_K 1000
     39#define DISK_K_STR "KiB"
     40#define DISK_M_STR "MiB"
     41#define DISK_G_STR "GiB"
     42#define DISK_T_STR "TiB"
     43
     44#define SPEED_K 1024
    4545#define SPEED_B_STR "B/s"
    46 #define SPEED_K_STR "kB/s"
    47 #define SPEED_M_STR "MB/s"
    48 #define SPEED_G_STR "GB/s"
    49 #define SPEED_T_STR "TB/s"
     46#define SPEED_K_STR "KiB/s"
     47#define SPEED_M_STR "MiB/s"
     48#define SPEED_G_STR "GiB/s"
     49#define SPEED_T_STR "TiB/s"
    5050
    5151static tr_option options[] =
Note: See TracChangeset for help on using the changeset viewer.