mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
fix bug when showing groups and changing sort type to queue order
This commit is contained in:
parent
d922389c9d
commit
4ac75b1b80
3 changed files with 2035 additions and 2056 deletions
|
@ -1609,6 +1609,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
sortType = SORT_ORDER;
|
||||
[fDefaults setBool: NO forKey: @"SortReverse"];
|
||||
[fDefaults setBool: NO forKey: @"SortByGroup"];
|
||||
[self updateDisplay: nil]; //ensure groups are removed
|
||||
break;
|
||||
case SORT_DATE_TAG:
|
||||
sortType = SORT_DATE;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -105,12 +105,6 @@
|
|||
fGroupIndexes = indexes;
|
||||
}
|
||||
|
||||
#warning needed?
|
||||
- (id) dataCellForRow: (NSInteger) row
|
||||
{
|
||||
return (row == -1 || ![fGroupIndexes containsIndex: row]) ? fTorrentCell : nil;
|
||||
}
|
||||
|
||||
- (BOOL) tableView: (NSTableView *) tableView isGroupRow: (NSInteger) row
|
||||
{
|
||||
return [fGroupIndexes containsIndex: row];
|
||||
|
@ -123,7 +117,7 @@
|
|||
|
||||
- (NSCell *) tableView: (NSTableView *) tableView dataCellForTableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row
|
||||
{
|
||||
return [self dataCellForRow: row];
|
||||
return ![fGroupIndexes containsIndex: row] ? fTorrentCell : nil;
|
||||
}
|
||||
|
||||
- (void) tableView: (NSTableView *) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn *) tableColumn row: (int) row
|
||||
|
@ -449,7 +443,7 @@
|
|||
[fActionMenu appendItemsFromMenu: fileMenu atIndexes: [NSIndexSet indexSetWithIndexesInRange: range] atBottom: YES];
|
||||
|
||||
//place menu below button
|
||||
NSRect rect = [[self dataCellForRow: row] iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
|
||||
NSRect rect = [fTorrentCell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
|
||||
NSPoint location = rect.origin;
|
||||
location.y += rect.size.height + 5.0;
|
||||
location = [self convertPoint: location toView: nil];
|
||||
|
@ -647,8 +641,7 @@
|
|||
if (row < 0 || [fGroupIndexes containsIndex: row])
|
||||
return NO;
|
||||
|
||||
TorrentCell * cell = [self dataCellForRow: row];
|
||||
return NSPointInRect(point, [cell controlButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
return NSPointInRect(point, [fTorrentCell controlButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
}
|
||||
|
||||
- (BOOL) pointInRevealRect: (NSPoint) point
|
||||
|
@ -657,8 +650,7 @@
|
|||
if (row < 0 || [fGroupIndexes containsIndex: row])
|
||||
return NO;
|
||||
|
||||
TorrentCell * cell = [self dataCellForRow: row];
|
||||
return NSPointInRect(point, [cell revealButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
return NSPointInRect(point, [fTorrentCell revealButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
}
|
||||
|
||||
- (BOOL) pointInActionRect: (NSPoint) point
|
||||
|
@ -667,8 +659,7 @@
|
|||
if (row < 0 || [fGroupIndexes containsIndex: row])
|
||||
return NO;
|
||||
|
||||
TorrentCell * cell = [self dataCellForRow: row];
|
||||
return NSPointInRect(point, [cell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
return NSPointInRect(point, [fTorrentCell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
}
|
||||
|
||||
- (BOOL) pointInProgressRect: (NSPoint) point
|
||||
|
@ -682,7 +673,7 @@
|
|||
cell = (TorrentCell *)[self preparedCellAtColumn: 0 row: row];
|
||||
else
|
||||
{
|
||||
cell = [self dataCellForRow: row];
|
||||
cell = fTorrentCell;
|
||||
[cell setRepresentedObject: [fTorrents objectAtIndex: row]];
|
||||
}
|
||||
return NSPointInRect(point, [cell progressRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
|
@ -699,7 +690,7 @@
|
|||
cell = (TorrentCell *)[self preparedCellAtColumn: 0 row: row];
|
||||
else
|
||||
{
|
||||
cell = [self dataCellForRow: row];
|
||||
cell = fTorrentCell;
|
||||
[cell setRepresentedObject: [fTorrents objectAtIndex: row]];
|
||||
}
|
||||
return NSPointInRect(point, [cell minimalStatusRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
|
||||
|
|
Loading…
Reference in a new issue