Changeset 14051


Ignore:
Timestamp:
Mar 12, 2013, 3:08:59 AM (9 years ago)
Author:
livings124
Message:

add a note to myself to set off the pieces view target/action in the xib instead of code

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoActivityViewController.h

    r13541 r14051  
    5757- (void) updateInfo;
    5858
    59 - (void) setPiecesView: (id) sender;
     59- (IBAction) setPiecesView: (id) sender;
     60- (IBAction) updatePiecesView: (id) sender;
    6061- (void) clearView;
    6162
  • trunk/macosx/InfoActivityViewController.m

    r14050 r14051  
    3838- (void) setupInfo;
    3939
    40 - (void) updatePiecesView;
    41 
    4240@end
    4341
     
    9694   
    9795    //set the click action of the pieces view
    98     [fPiecesView setAction:@selector(updatePiecesView)];
     96    #warning after 2.8 just hook this up in the xib
     97    [fPiecesView setAction:@selector(updatePiecesView:)];
    9998    [fPiecesView setTarget:self];
    10099}
     
    206205}
    207206
     207
     208- (void) updatePiecesView: (id) sender
     209{
     210    const BOOL piecesAvailableSegment = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
     211   
     212    [fPiecesControl setSelected: piecesAvailableSegment forSegment: PIECES_CONTROL_AVAILABLE];
     213    [fPiecesControl setSelected: !piecesAvailableSegment forSegment: PIECES_CONTROL_PROGRESS];
     214   
     215    [fPiecesView updateView];
     216}
     217
    208218- (void) clearView
    209219{
     
    262272}
    263273
    264 - (void) updatePiecesView
    265 {
    266     const BOOL piecesAvailableSegment = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
    267    
    268     [fPiecesControl setSelected: piecesAvailableSegment forSegment: PIECES_CONTROL_AVAILABLE];
    269     [fPiecesControl setSelected: !piecesAvailableSegment forSegment: PIECES_CONTROL_PROGRESS];
    270    
    271     [fPiecesView updateView];
    272 }
    273 
    274274@end
Note: See TracChangeset for help on using the changeset viewer.