- (void) setInfoForTorrents: (NSArray *) torrents;
- (void) updateInfo;
-- (void) setPiecesView: (id) sender;
+- (IBAction) setPiecesView: (id) sender;
+- (IBAction) updatePiecesView: (id) sender;
- (void) clearView;
@end
- (void) setupInfo;
-- (void) updatePiecesView;
-
@end
@implementation InfoActivityViewController
}
//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];
}
[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];
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