diff --git a/macosx/Controller.m b/macosx/Controller.m index e526e6cb8..9a7b4a7d4 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -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: diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index f4c3c17b0..f3308c692 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -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];