hardcode the max group constant; trivial changes

This commit is contained in:
Mitchell Livingston 2008-10-29 02:33:20 +00:00
parent bb48869f3e
commit 819c1af60e
5 changed files with 11 additions and 11 deletions

View File

@ -2353,7 +2353,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) autoSpeedLimitChange: (NSNotification *) notification
{
//clear timer here in case its not being reset
//clear timer here in case it's not being reset
[fSpeedLimitTimer invalidate];
fSpeedLimitTimer = nil;

View File

@ -28,7 +28,7 @@
- (void) appendItemsFromMenu: (NSMenu *) menu atIndexes: (NSIndexSet *) indexes atBottom: (BOOL) bottom
{
int bottomIndex = bottom ? [self numberOfItems] : 0;
NSInteger bottomIndex = bottom ? [self numberOfItems] : 0;
NSMenuItem * item;
for (NSUInteger i = [indexes lastIndex]; i != NSNotFound; i = [indexes indexLessThanIndex: i])

View File

@ -45,8 +45,8 @@
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"DisplayPeerProgressBarNumber"])
{
if (!fAttributes)
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont systemFontOfSize: 11.0], NSFontAttributeName, nil];
[[NSString localizedStringWithFormat: @"%.1f%%", [self floatValue] * 100.0] drawInRect: cellFrame withAttributes: fAttributes];
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont systemFontOfSize: 11.0f], NSFontAttributeName, nil];
[[NSString localizedStringWithFormat: @"%.1f%%", [self floatValue] * 100.0f] drawInRect: cellFrame withAttributes: fAttributes];
}
else
{
@ -58,15 +58,15 @@
}
[super drawWithFrame: cellFrame inView: controlView];
if ([self floatValue] >= 1.0)
if ([self floatValue] >= 1.0f)
{
NSImage * checkImage = [NSImage imageNamed: @"CompleteCheck.png"];
[checkImage setFlipped: YES];
NSSize imageSize = [checkImage size];
NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height);
[checkImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5f,
cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5f, imageSize.width, imageSize.height);
[checkImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0f];
}
}
}

View File

@ -70,7 +70,7 @@
- (CGFloat) uploadRate
{
float rate = 0.0f;
CGFloat rate = 0.0f;
NSEnumerator * enumerator = [fTorrents objectEnumerator];
Torrent * torrent;
while ((torrent = [enumerator nextObject]))
@ -81,7 +81,7 @@
- (CGFloat) downloadRate
{
float rate = 0.0f;
CGFloat rate = 0.0f;
NSEnumerator * enumerator = [fTorrents objectEnumerator];
Torrent * torrent;
while ((torrent = [enumerator nextObject]))

View File

@ -30,7 +30,7 @@
#import "QuickLookController.h"
#import "NSApplicationAdditions.h"
#define MAX_GROUP (INT_MAX-10)
#define MAX_GROUP 999999
#define ACTION_MENU_GLOBAL_TAG 101
#define ACTION_MENU_UNLIMITED_TAG 102