Changeset 13161
- Timestamp:
- Jan 14, 2012, 4:08:45 PM (11 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r13141 r13161 92 92 93 93 QLPreviewPanel * fPreviewPanel; 94 BOOL fLaunching;95 94 BOOL fQuitting; 96 95 BOOL fQuitRequested; -
trunk/macosx/Controller.m
r13156 r13161 214 214 if ((self = [super init])) 215 215 { 216 fLaunching = YES;217 218 216 fDefaults = [NSUserDefaults standardUserDefaults]; 219 217 … … 517 515 if ([fDefaults boolForKey: @"InfoVisible"]) 518 516 [self showInfo: nil]; 519 520 fLaunching = NO;521 517 } 522 518 … … 2187 2183 BOOL beganUpdates = NO; 2188 2184 2189 //don't animate torrents when first launching 2190 if (onLion && fLaunching) 2191 { 2192 [[NSAnimationContext currentContext] setDuration: 0]; 2185 if (onLion) 2186 { 2187 //don't animate torrents when first launching 2188 static dispatch_once_t onceToken; 2189 dispatch_once(&onceToken, ^{ 2190 [[NSAnimationContext currentContext] setDuration: 0]; 2191 }); 2193 2192 [NSAnimationContext beginGrouping]; 2194 2193 } … … 2204 2203 2205 2204 //for each of the torrents to add, find if it already exists (and keep track of those we've already added & those we need to remove) 2206 [allTorrents enumerateObjectsWithOptions: 0 usingBlock: ^(id objAll, NSUInteger previousIndex, BOOL * stop) {2205 [allTorrents enumerateObjectsWithOptions: 0 usingBlock: ^(id objAll, NSUInteger previousIndex, BOOL * stop) { 2207 2206 const NSUInteger currentIndex = [fDisplayedTorrents indexOfObjectAtIndexes: removePreviousIndexes options: NSEnumerationConcurrent passingTest: ^(id objDisplay, NSUInteger idx, BOOL *stop) { 2208 2207 return (BOOL)(objAll == objDisplay); … … 2265 2264 2266 2265 NSMutableDictionary * groupsByIndex = [NSMutableDictionary dictionaryWithCapacity: [fDisplayedTorrents count]]; 2267 2268 #warning necessary? make more efficient?2269 2266 for (TorrentGroup * group in fDisplayedTorrents) 2270 2267 [groupsByIndex setObject: group forKey: [NSNumber numberWithInteger: [group groupIndex]]]; … … 2424 2421 [fTableView setNeedsDisplay: YES]; 2425 2422 2426 if (fLaunching) 2427 [NSAnimationContext endGrouping]; 2423 [NSAnimationContext endGrouping]; 2428 2424 } 2429 2425 else
Note: See TracChangeset
for help on using the changeset viewer.