Changeset 1002 for trunk/macosx


Ignore:
Timestamp:
Oct 13, 2006, 1:47:52 PM (15 years ago)
Author:
livings124
Message:

Clicking on the pieces view will toggle between piece progress view and availability view (a tooltip clarifies which view is current).

Location:
trunk/macosx
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r923 r1002  
    4747        {CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
    4848        {
     49            CLASS = PiecesImageView;
     50            LANGUAGE = ObjC;
     51            OUTLETS = {fPiecesView = PiecesView; };
     52            SUPERCLASS = NSImageView;
     53        },
     54        {
    4955            CLASS = PiecesView;
    5056            LANGUAGE = ObjC;
  • trunk/macosx/PiecesView.h

    r995 r1002  
    4242- (void) setTorrent: (Torrent *) torrent;
    4343- (void) updateView: (BOOL) first;
     44- (void) toggleView;
    4445
    4546@end
  • trunk/macosx/PiecesView.m

    r999 r1002  
    135135        [fBluePiece unlockFocus];
    136136       
     137        [fImageView setToolTip: [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]
     138                            ? @"Piece Availability" : @"Piece Progress"];
     139       
    137140        //actually draw the box
    138141        [self setTorrent: nil];
     
    378381}
    379382
    380 /*- (void) toggleView: (id) sender
     383- (void) toggleView
    381384{
    382385    NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
    383     [defaults setBool: ![defaults boolForKey: @"PiecesViewShowAvailability"]
    384                 forKey: @"PiecesViewShowAvailability"];
     386    BOOL showAvailability = ![defaults boolForKey: @"PiecesViewShowAvailability"];
     387   
     388    [defaults setBool: showAvailability forKey: @"PiecesViewShowAvailability"];
     389   
     390    [fImageView setToolTip: showAvailability ? @"Piece Availability" : @"Piece Progress"];
    385391   
    386392    [self updateView: YES];
    387 }*/
     393}
    388394
    389395@end
Note: See TracChangeset for help on using the changeset viewer.