default:
icon = [[GroupsController groups] imageForIndex: index isSmall: YES];
toolTip = [NSString stringWithFormat: @"%@: %@", NSLocalizedString(@"Group", "Groups -> Button"),
- [[GroupsController groups] nameForIndex: index]];
+ [[GroupsController groups] nameForIndex: index]];
}
[[fGroupFilterMenu itemAtIndex: 0] setImage: icon];
}
//attempt to have minimum of 3 digits with at least 1 decimal
- return [NSString localizedStringWithFormat: convertedSize < 10.0 ? @"%.2f %@" : @"%.1f %@", convertedSize, unit];
+ NSString * formattedSize = convertedSize < 10.0 ? [NSString localizedStringWithFormat: @"%.2f", convertedSize - .005]
+ : [NSString localizedStringWithFormat: @"%.1f", convertedSize - .05];
+ return [formattedSize stringByAppendingFormat: @" %@", unit];
}
+ (NSString *) stringForSpeed: (float) speed
if (speed < 1000.0) //0.0 K to 999.9 K
return [NSString localizedStringWithFormat: @"%.1f K", speed];
else if (speed < 102400.0) //0.98 M to 99.99 M
- return [NSString localizedStringWithFormat: @"%.2f M", speed / 1024.0];
+ return [NSString localizedStringWithFormat: @"%.2f M", (speed / 1024.0) - .005];
else if (speed < 1024000.0) //100.0 M to 999.9 M
- return [NSString localizedStringWithFormat: @"%.1f M", speed / 1024.0];
+ return [NSString localizedStringWithFormat: @"%.1f M", (speed / 1024.0) - .05];
else //insane speeds
- return [NSString localizedStringWithFormat: @"%.2f G", speed / 1048576.0];
+ return [NSString localizedStringWithFormat: @"%.2f G", (speed / 1048576.0) - .005];
}
+ (NSString *) stringForRatio: (float) ratio