Changeset 13156
- Timestamp:
- Jan 12, 2012, 12:12:17 AM (11 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r13153 r13156 500 500 [nc addObserver: self selector: @selector(openCreatedFile:) 501 501 name: @"OpenCreatedTorrentFile" object: nil]; 502 503 [nc addObserver: self selector: @selector(applyFilter) 504 name: @"UpdateGroups" object: nil]; 502 505 503 506 //timer to update the interface every second … … 2353 2356 2354 2357 //remove empty groups 2355 NSIndexSet * remove Indexes = [fDisplayedTorrents indexesOfObjectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, originalGroupCount)] options: NSEnumerationConcurrent passingTest: ^BOOL(id obj, NSUInteger idx, BOOL * stop) {2358 NSIndexSet * removeGroupIndexes = [fDisplayedTorrents indexesOfObjectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, originalGroupCount)] options: NSEnumerationConcurrent passingTest: ^BOOL(id obj, NSUInteger idx, BOOL * stop) { 2356 2359 return [[(TorrentGroup *)obj torrents] count] == 0; 2357 2360 }]; 2358 2361 2359 if ([remove Indexes count] > 0)2360 { 2361 [fDisplayedTorrents removeObjectsAtIndexes: remove Indexes];2362 if ([removeGroupIndexes count] > 0) 2363 { 2364 [fDisplayedTorrents removeObjectsAtIndexes: removeGroupIndexes]; 2362 2365 if (onLion) 2363 [fTableView removeItemsAtIndexes: remove Indexes inParent: nil withAnimation: NSTableViewAnimationEffectFade];2366 [fTableView removeItemsAtIndexes: removeGroupIndexes inParent: nil withAnimation: NSTableViewAnimationEffectFade]; 2364 2367 } 2365 2368 … … 2370 2373 else 2371 2374 { 2372 NSAssert(groupRows != wasGroupRows, @"Trying toggl ng-grouptorrent reordering when we weren't expecting to.");2375 NSAssert(groupRows != wasGroupRows, @"Trying toggling group-torrent reordering when we weren't expecting to."); 2373 2376 2374 2377 //since we're not doing this the right way (boo buggy animation), we need to remember selected values -
trunk/macosx/FilterBarController.m
r12897 r13156 393 393 { 394 394 [self updateGroupsButton]; 395 396 [[NSNotificationCenter defaultCenter] postNotificationName: @"ApplyFilter" object: nil];397 395 } 398 396
Note: See TracChangeset
for help on using the changeset viewer.