mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
add a note to myself to set off the pieces view target/action in the xib instead of code
This commit is contained in:
parent
90b042f789
commit
9e99950dd4
2 changed files with 15 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue