Changeset 3064


Ignore:
Timestamp:
Sep 14, 2007, 2:49:00 PM (14 years ago)
Author:
livings124
Message:

a little code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r3063 r3064  
    6464@implementation InfoWindowController
    6565
    66 - (id) initWithWindowNibName: (NSString *) name
    67 {
    68     if ((self = [super initWithWindowNibName: name]))
    69     {
    70         fAppIcon = [NSImage imageNamed: @"NSApplicationIcon"];
    71         fDotGreen = [NSImage imageNamed: @"GreenDot.tiff"];
    72         fDotRed = [NSImage imageNamed: @"RedDot.tiff"];
    73     }
    74     return self;
    75 }
    76 
    7766- (void) awakeFromNib
    7867{
     68    //get images
     69    fAppIcon = [NSImage imageNamed: @"NSApplicationIcon"];
     70    fDotGreen = [NSImage imageNamed: @"GreenDot.tiff"];
     71    fDotRed = [NSImage imageNamed: @"RedDot.tiff"];
     72   
    7973    //window location and size
    8074    NSPanel * window = (NSPanel *)[self window];
     
    874868    {
    875869        NSDictionary * peer = [fPeers objectAtIndex: row];
    876         BOOL connected = [[peer objectForKey: @"Connected"] boolValue];
    877        
    878         NSMutableArray * components = [NSMutableArray arrayWithCapacity: connected ? 4 : 2];
    879        
    880         if (connected)
     870        NSMutableArray * components = [NSMutableArray arrayWithCapacity: 4];
     871       
     872        if ([[peer objectForKey: @"Connected"] boolValue])
     873        {
    881874            [components addObject: [NSString stringWithFormat:
    882875                                    NSLocalizedString(@"Progress: %.1f%%", "Inspector -> Peers tab -> table row tooltip"),
    883876                                    [[peer objectForKey: @"Progress"] floatValue] * 100.0]];
     877           
     878            /*if ([[peer objectForKey: @"Encryption"] boolValue])
     879                [components addObject: NSLocalizedString(@"Encrypted Connection", "Inspector -> Peers tab -> table row tooltip")];*/
     880        }
    884881       
    885882        int port;
     
    899896        else
    900897            [components addObject: NSLocalizedString(@"From: tracker", "Inspector -> Peers tab -> table row tooltip")];
    901        
    902         /*if (connected && [[peer objectForKey: @"Encryption"] boolValue])
    903             [components addObject: @"Encrypted Connection"];*/
    904898       
    905899        return [components componentsJoinedByString: @"\n"];
Note: See TracChangeset for help on using the changeset viewer.