Changeset 9241
- Timestamp:
- Oct 3, 2009, 2:10:52 PM (13 years ago)
- Location:
- trunk/macosx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/BadgeView.m
r7894 r9241 117 117 } 118 118 119 NSRect badgeRect = NSZeroRect;119 NSRect badgeRect; 120 120 badgeRect.size = [badge size]; 121 badgeRect.origin.x = 0; 121 122 badgeRect.origin.y = height; 122 123 -
trunk/macosx/GroupsController.m
r9009 r9241 67 67 [NSColor redColor], @"Color", 68 68 NSLocalizedString(@"Red", "Groups -> Name"), @"Name", 69 [NSNumber numberWithInt : 0], @"Index", nil];69 [NSNumber numberWithInteger: 0], @"Index", nil]; 70 70 71 71 NSMutableDictionary * orange = [NSMutableDictionary dictionaryWithObjectsAndKeys: 72 72 [NSColor orangeColor], @"Color", 73 73 NSLocalizedString(@"Orange", "Groups -> Name"), @"Name", 74 [NSNumber numberWithInt : 1], @"Index", nil];74 [NSNumber numberWithInteger: 1], @"Index", nil]; 75 75 76 76 NSMutableDictionary * yellow = [NSMutableDictionary dictionaryWithObjectsAndKeys: 77 77 [NSColor yellowColor], @"Color", 78 78 NSLocalizedString(@"Yellow", "Groups -> Name"), @"Name", 79 [NSNumber numberWithInt : 2], @"Index", nil];79 [NSNumber numberWithInteger: 2], @"Index", nil]; 80 80 81 81 NSMutableDictionary * green = [NSMutableDictionary dictionaryWithObjectsAndKeys: 82 82 [NSColor greenColor], @"Color", 83 83 NSLocalizedString(@"Green", "Groups -> Name"), @"Name", 84 [NSNumber numberWithInt : 3], @"Index", nil];84 [NSNumber numberWithInteger: 3], @"Index", nil]; 85 85 86 86 NSMutableDictionary * blue = [NSMutableDictionary dictionaryWithObjectsAndKeys: 87 87 [NSColor blueColor], @"Color", 88 88 NSLocalizedString(@"Blue", "Groups -> Name"), @"Name", 89 [NSNumber numberWithInt : 4], @"Index", nil];89 [NSNumber numberWithInteger: 4], @"Index", nil]; 90 90 91 91 NSMutableDictionary * purple = [NSMutableDictionary dictionaryWithObjectsAndKeys: 92 92 [NSColor purpleColor], @"Color", 93 93 NSLocalizedString(@"Purple", "Groups -> Name"), @"Name", 94 [NSNumber numberWithInt : 5], @"Index", nil];94 [NSNumber numberWithInteger: 5], @"Index", nil]; 95 95 96 96 NSMutableDictionary * gray = [NSMutableDictionary dictionaryWithObjectsAndKeys: 97 97 [NSColor grayColor], @"Color", 98 98 NSLocalizedString(@"Gray", "Groups -> Name"), @"Name", 99 [NSNumber numberWithInt : 6], @"Index", nil];99 [NSNumber numberWithInteger: 6], @"Index", nil]; 100 100 101 101 fGroups = [[NSMutableArray alloc] initWithObjects: red, orange, yellow, green, blue, purple, gray, nil]; … … 123 123 { 124 124 for (NSInteger i = 0; i < [fGroups count]; i++) 125 if (index == [[[fGroups objectAtIndex: i] objectForKey: @"Index"] int Value])125 if (index == [[[fGroups objectAtIndex: i] objectForKey: @"Index"] integerValue]) 126 126 return i; 127 127 } … … 131 131 - (NSInteger) indexForRow: (NSInteger) row 132 132 { 133 return [[[fGroups objectAtIndex: row] objectForKey: @"Index"] int Value];133 return [[[fGroups objectAtIndex: row] objectForKey: @"Index"] integerValue]; 134 134 } 135 135 … … 257 257 BOOL found = NO; 258 258 for (NSDictionary * dict in fGroups) 259 if ([[dict objectForKey: @"Index"] int Value] == index)259 if ([[dict objectForKey: @"Index"] integerValue] == index) 260 260 { 261 261 found = YES; … … 267 267 } 268 268 269 [fGroups addObject: [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt : index], @"Index",269 [fGroups addObject: [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInteger: index], @"Index", 270 270 [NSColor cyanColor], @"Color", @"", @"Name", nil]]; 271 271 … … 276 276 - (void) removeGroupWithRowIndex: (NSInteger) row 277 277 { 278 NSInteger index = [[[fGroups objectAtIndex: row] objectForKey: @"Index"] int Value];278 NSInteger index = [[[fGroups objectAtIndex: row] objectForKey: @"Index"] integerValue]; 279 279 [fGroups removeObjectAtIndex: row]; 280 280 281 281 [[NSNotificationCenter defaultCenter] postNotificationName: @"GroupValueRemoved" object: self userInfo: 282 [NSDictionary dictionaryWithObject: [NSNumber numberWithInt : index] forKey: @"Index"]];282 [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger: index] forKey: @"Index"]]; 283 283 284 284 if (index == [[NSUserDefaults standardUserDefaults] integerForKey: @"FilterGroup"]) … … 336 336 [item setTarget: target]; 337 337 338 [item setTag: [[dict objectForKey: @"Index"] int Value]];338 [item setTag: [[dict objectForKey: @"Index"] integerValue]]; 339 339 340 340 NSImage * icon = [self imageForGroup: dict]; … … 361 361 for (NSDictionary * group in fGroups) 362 362 { 363 NSInteger row = [[group objectForKey: @"Index"] int Value];363 NSInteger row = [[group objectForKey: @"Index"] integerValue]; 364 364 if ([self torrent: torrent doesMatchRulesForGroupAtIndex: row]) 365 365 return row; -
trunk/macosx/TorrentCell.m
r9217 r9241 429 429 } 430 430 431 //error image432 431 const BOOL error = [torrent isErrorOrWarning]; 433 NSImage * errorImage = error ? [NSImage imageNamed: [NSApp isOnSnowLeopardOrBetter] ? NSImageNameCaution : @"Error.png"] : nil;434 432 435 433 //icon 436 434 if (!minimal || !(!fTracking && fHoverAction)) //don't show in minimal mode when hovered over 437 435 { 438 NSImage * icon = (minimal && error) ? errorImage : [torrent icon]; 436 NSImage * icon = (minimal && error) ? [NSImage imageNamed: [NSApp isOnSnowLeopardOrBetter] ? NSImageNameCaution : @"Error.png"] 437 : [torrent icon]; 439 438 [self drawImage: icon inRect: iconRect]; 440 439 } 441 440 441 //error badge 442 442 if (error && !minimal) 443 443 { 444 444 NSRect errorRect = NSMakeRect(NSMaxX(iconRect) - ERROR_IMAGE_SIZE, NSMaxY(iconRect) - ERROR_IMAGE_SIZE, 445 445 ERROR_IMAGE_SIZE, ERROR_IMAGE_SIZE); 446 [self drawImage: errorImageinRect: errorRect];446 [self drawImage: [NSImage imageNamed: [NSApp isOnSnowLeopardOrBetter] ? NSImageNameCaution : @"Error.png"] inRect: errorRect]; 447 447 } 448 448 -
trunk/macosx/TorrentTableView.m
r9146 r9241 514 514 } 515 515 516 #warning catch string urls? 516 517 - (void) paste: (id) sender 517 518 { -
trunk/macosx/TrackerTableView.m
r9228 r9241 120 120 121 121 if (action == @selector(paste:)) 122 {123 122 return fTorrent && ([NSApp isOnSnowLeopardOrBetter] 124 123 ? [[NSPasteboard generalPasteboard] canReadObjectForClasses: [NSArray arrayWithObject: [NSString class]] options: nil] 125 124 : [[NSPasteboard generalPasteboard] availableTypeFromArray: [NSArray arrayWithObject: NSStringPboardType]] != nil); 126 }127 125 128 126 return YES;
Note: See TracChangeset
for help on using the changeset viewer.