Changeset 111


Ignore:
Timestamp:
Feb 9, 2006, 6:38:09 AM (16 years ago)
Author:
titer
Message:

Reverted the bottom of the window to the way it was before.
Minor change to stringForSpeedAbbrev so it never shows more than four
digits (-> no overlapping possible in the window or the badge).

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/StringAdditions.m

    r103 r111  
    3535+ (NSString *) stringForSpeedAbbrev: (float) speed
    3636{
    37     if (speed < 1024)
     37    if (speed < 1000)         /* 0.0 K to 999.9 K */
    3838        return [NSString stringWithFormat: @"%.1f K", speed];
    39     else if (speed < 1048576)
     39    else if (speed < 102400)  /* 0.98 M to 99.99 M */
    4040        return [NSString stringWithFormat: @"%.2f M", speed / 1024];
    41     else
     41    else if (speed < 1024000) /* 100.0 M to 999.9 M */
     42        return [NSString stringWithFormat: @"%.1f M", speed / 1024];
     43    else                      /* Insane speeds */
    4244        return [NSString stringWithFormat: @"%.2f G", speed / 1048576];
    4345}
Note: See TracChangeset for help on using the changeset viewer.