diff --git a/macosx/InfoActivityViewController.h b/macosx/InfoActivityViewController.h index ae12b1a70..37c7ccc39 100644 --- a/macosx/InfoActivityViewController.h +++ b/macosx/InfoActivityViewController.h @@ -56,7 +56,8 @@ - (void) setInfoForTorrents: (NSArray *) torrents; - (void) updateInfo; -- (void) setPiecesView: (id) sender; +- (IBAction) setPiecesView: (id) sender; +- (IBAction) updatePiecesView: (id) sender; - (void) clearView; @end diff --git a/macosx/InfoActivityViewController.m b/macosx/InfoActivityViewController.m index 4f06d6dcd..64ebf7d3e 100644 --- a/macosx/InfoActivityViewController.m +++ b/macosx/InfoActivityViewController.m @@ -37,8 +37,6 @@ - (void) setupInfo; -- (void) updatePiecesView; - @end @implementation InfoActivityViewController @@ -95,7 +93,8 @@ } //set the click action of the pieces view - [fPiecesView setAction:@selector(updatePiecesView)]; + #warning after 2.8 just hook this up in the xib + [fPiecesView setAction:@selector(updatePiecesView:)]; [fPiecesView setTarget:self]; } @@ -205,6 +204,17 @@ [self updatePiecesView]; } + +- (void) updatePiecesView: (id) sender +{ + const BOOL piecesAvailableSegment = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]; + + [fPiecesControl setSelected: piecesAvailableSegment forSegment: PIECES_CONTROL_AVAILABLE]; + [fPiecesControl setSelected: !piecesAvailableSegment forSegment: PIECES_CONTROL_PROGRESS]; + + [fPiecesView updateView]; +} + - (void) clearView { [fPiecesView clearView]; @@ -261,14 +271,4 @@ fSet = YES; } -- (void) updatePiecesView -{ - const BOOL piecesAvailableSegment = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]; - - [fPiecesControl setSelected: piecesAvailableSegment forSegment: PIECES_CONTROL_AVAILABLE]; - [fPiecesControl setSelected: !piecesAvailableSegment forSegment: PIECES_CONTROL_PROGRESS]; - - [fPiecesView updateView]; -} - @end