Changeset 8165


Ignore:
Timestamp:
Apr 6, 2009, 4:50:39 PM (13 years ago)
Author:
charles
Message:

(gtk 1.5x) backport r8078, which fixes a bug in (the unlikely) display of MB/s speeds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/gtk/util.c

    r8143 r8165  
    123123        g_snprintf( buf, buflen, _( "%'.1f KB/s" ), speed );
    124124    else if( speed < 102400.0 ) /* 0.98 MB to 99.99 MB */
    125         g_snprintf( buf, buflen, _( "%'.2f MB/s" ), ( speed / 1024 ) );
     125        g_snprintf( buf, buflen, _( "%'.2f MB/s" ), ( speed / KILOBYTE_FACTOR ) );
    126126    else if( speed < 1024000.0 ) /* 100.0 MB to 999.9 MB */
    127         g_snprintf( buf, buflen, _( "%'.1f MB/s" ), ( speed / 1024 ) );
     127        g_snprintf( buf, buflen, _( "%'.1f MB/s" ), ( speed / MEGABYTE_FACTOR ) );
    128128    else /* insane speeds */
    129         g_snprintf( buf, buflen, _( "%'.2f GB/s" ), ( speed / 1048576 ) );
     129        g_snprintf( buf, buflen, _( "%'.2f GB/s" ), ( speed / GIGABYTE_FACTOR ) );
    130130
    131131    return buf;
Note: See TracChangeset for help on using the changeset viewer.