Changeset 8078


Ignore:
Timestamp:
Mar 23, 2009, 12:15:29 AM (13 years ago)
Author:
charles
Message:

(gtk) huge multi-megabyte speeds weren't being generated correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.c

    r8034 r8078  
    111111        g_snprintf( buf, buflen, _( "%'.1f KB/s" ), speed );
    112112    else if( speed < 102400.0 ) /* 0.98 MB to 99.99 MB */
    113         g_snprintf( buf, buflen, _( "%'.2f MB/s" ), ( speed / 1024 ) );
     113        g_snprintf( buf, buflen, _( "%'.2f MB/s" ), ( speed / KILOBYTE_FACTOR ) );
    114114    else if( speed < 1024000.0 ) /* 100.0 MB to 999.9 MB */
    115         g_snprintf( buf, buflen, _( "%'.1f MB/s" ), ( speed / 1024 ) );
     115        g_snprintf( buf, buflen, _( "%'.1f MB/s" ), ( speed / MEGABYTE_FACTOR ) );
    116116    else /* insane speeds */
    117         g_snprintf( buf, buflen, _( "%'.2f GB/s" ), ( speed / 1048576 ) );
     117        g_snprintf( buf, buflen, _( "%'.2f GB/s" ), ( speed / GIGABYTE_FACTOR ) );
    118118
    119119    return buf;
Note: See TracChangeset for help on using the changeset viewer.