Changeset 4879
- Timestamp:
- Jan 31, 2008, 4:02:26 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentTableView.m
r4846 r4879 34 34 #define ACTION_MENU_LIMIT_TAG 103 35 35 36 #define PIECE_ INCREASE 0.136 #define PIECE_CHANGE 0.1 37 37 #define PIECE_TIME 0.01 38 38 … … 314 314 for (i = [selectedIndexes firstIndex]; i != NSNotFound; i = [selectedIndexes indexGreaterThanIndex: i]) 315 315 { 316 317 316 if (![fGroupIndexes containsIndex: i]) 318 317 [indexSet addIndex: i]; 319 318 else 320 319 { 321 NSUInteger nextGroup = [fGroupIndexes indexGreaterThanIndex: i], 322 count = (nextGroup != NSNotFound ? nextGroup : [fTorrents count]) - i - 1; 323 [indexSet addIndexesInRange: NSMakeRange(i+1, count)]; 324 i = nextGroup-1; 320 NSUInteger nextGroup = [fGroupIndexes indexGreaterThanIndex: i]; 321 if (nextGroup == NSNotFound) 322 nextGroup = [fTorrents count]; 323 324 [indexSet addIndexesInRange: NSMakeRange(i+1, nextGroup - i - 1)]; 325 326 i = nextGroup - 1; 325 327 } 326 328 } … … 331 333 { 332 334 int row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]]; 333 334 335 if (row >= 0) 335 336 { … … 665 666 { 666 667 int row = [self rowAtPoint: point]; 667 if (row < 0 668 if (row < 0 || [fGroupIndexes containsIndex: row] || [fDefaults boolForKey: @"SmallView"]) 668 669 return NO; 669 670 … … 682 683 { 683 684 int row = [self rowAtPoint: point]; 684 if (row < 0 685 if (row < 0 || [fGroupIndexes containsIndex: row] || ![fDefaults boolForKey: @"SmallView"]) 685 686 return NO; 686 687 … … 748 749 if ([fDefaults boolForKey: @"PiecesBar"]) 749 750 { 750 fPiecesBarPercent = MIN(fPiecesBarPercent + PIECE_ INCREASE, 1.0);751 fPiecesBarPercent = MIN(fPiecesBarPercent + PIECE_CHANGE, 1.0); 751 752 done = fPiecesBarPercent == 1.0; 752 753 } 753 754 else 754 755 { 755 fPiecesBarPercent = MAX(fPiecesBarPercent - PIECE_ INCREASE, 0.0);756 fPiecesBarPercent = MAX(fPiecesBarPercent - PIECE_CHANGE, 0.0); 756 757 done = fPiecesBarPercent == 0.0; 757 758 }
Note: See TracChangeset
for help on using the changeset viewer.