mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
fix a crash on Tiger
This commit is contained in:
parent
e6fa5577b6
commit
02799f7060
2 changed files with 14 additions and 11 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:
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
fTorrentCell = [[TorrentCell alloc] init];
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
|
||||
|
||||
fMouseControlRow = -1;
|
||||
fMouseRevealRow = -1;
|
||||
|
@ -76,9 +78,6 @@
|
|||
- (void) awakeFromNib
|
||||
{
|
||||
[self setGridStyleMask: NSTableViewSolidVerticalGridLineMask]; //weird redrawing issues if set to none
|
||||
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
@ -745,19 +744,22 @@
|
|||
|
||||
- (void) resizePiecesBarIncrement
|
||||
{
|
||||
BOOL increase = [fDefaults boolForKey: @"PiecesBar"];
|
||||
|
||||
if (increase)
|
||||
fPiecesBarPercent += PIECE_INCREASE;
|
||||
BOOL done;
|
||||
if ([fDefaults boolForKey: @"PiecesBar"])
|
||||
{
|
||||
fPiecesBarPercent = MIN(fPiecesBarPercent + PIECE_INCREASE, 1.0);
|
||||
done = fPiecesBarPercent == 1.0;
|
||||
}
|
||||
else
|
||||
fPiecesBarPercent -= PIECE_INCREASE;
|
||||
{
|
||||
fPiecesBarPercent = MAX(fPiecesBarPercent - PIECE_INCREASE, 0.0);
|
||||
done = fPiecesBarPercent == 0.0;
|
||||
}
|
||||
|
||||
if (increase ? (fPiecesBarPercent >= 1.0) : (fPiecesBarPercent <= 0.0))
|
||||
if (done)
|
||||
{
|
||||
[fPiecesBarTimer invalidate];
|
||||
fPiecesBarTimer = nil;
|
||||
|
||||
fPiecesBarPercent = increase ? 1.0 : 0.0;
|
||||
}
|
||||
|
||||
[self reloadData];
|
||||
|
|
Loading…
Reference in a new issue