diff --git a/macosx/Controller.m b/macosx/Controller.m index 6e6f734e4..e0a2202b2 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -93,8 +93,7 @@ static void sleepCallBack( void * controller, io_service_t y, { [fPrefsController setPrefs: fLib]; - [fAdvancedBarItem setState: [fDefaults - boolForKey: @"UseAdvancedBar"] ? NSOnState : NSOffState]; + [fAdvancedBarItem setState: [fDefaults boolForKey: @"UseAdvancedBar"]]; fToolbar = [[NSToolbar alloc] initWithIdentifier: @"Transmission Toolbar"]; [fToolbar setDelegate: self]; @@ -476,8 +475,6 @@ static void sleepCallBack( void * controller, io_service_t y, } [self updateUI: nil]; - if ([fSortType isEqualToString: @"State"]) - [self sortTorrents]; [self updateTorrentHistory]; } @@ -503,8 +500,6 @@ static void sleepCallBack( void * controller, io_service_t y, } [self updateUI: nil]; - if ([fSortType isEqualToString: @"State"]) - [self sortTorrents]; [self updateTorrentHistory]; } @@ -737,13 +732,10 @@ static void sleepCallBack( void * controller, io_service_t y, [self notifyGrowl: [torrent name]]; if( ![fWindow isKeyWindow] ) fCompleted++; - - if ([fSortType isEqualToString: @"State"]) - [self sortTorrents]; } } - if ([fSortType isEqualToString: @"Progress"]) + if ([fSortType isEqualToString: @"Progress"] || [fSortType isEqualToString: @"State"]) [self sortTorrents]; else [fTableView reloadData]; @@ -932,9 +924,6 @@ static void sleepCallBack( void * controller, io_service_t y, - (void) ratioSingleChange: (NSNotification *) notification { - if ([fSortType isEqualToString: @"State"]) - [self sortTorrents]; - //update info for changed ratio setting NSArray * torrents = [self torrentsAtIndexes: [fTableView selectedRowIndexes]]; if ([torrents containsObject: [notification object]]) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 5a9ca9b16..c1999ba36 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -146,8 +146,7 @@ fStat = tr_torrentStat( fHandle ); - [[NSNotificationCenter defaultCenter] postNotificationName: - @"TorrentRatioChanged" object: self]; + [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentRatioChanged" object: self]; } [fProgressString setString: @""]; diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 07af01b50..160adfdca 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -113,14 +113,14 @@ else if( sameRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint] ) [[fTorrents objectAtIndex: row] reveal]; - else - if ([e clickCount] == 2) - { - if ([self pointInIconRect: point]) - [[fTorrents objectAtIndex: row] reveal]; - else - [fController showInfo: nil]; - } + else if ([e clickCount] == 2) + { + if ([self pointInIconRect: point]) + [[fTorrents objectAtIndex: row] reveal]; + else + [fController showInfo: nil]; + } + else; [super mouseUp: e];