Changeset 3464


Ignore:
Timestamp:
Oct 19, 2007, 1:24:42 AM (14 years ago)
Author:
livings124
Message:

trivial code cleanup

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r3453 r3464  
    14331433- (void) updateUI
    14341434{
     1435    #warning make main thread?
    14351436    [fTorrents makeObjectsPerformSelector: @selector(update)];
    14361437   
     
    14641465            [fInfoController updateInfoStats];
    14651466    }
    1466 
     1467   
    14671468    //badge dock
    14681469    [fBadger updateBadge];
     
    20212022   
    20222023    //check if should be on if within range
    2023     BOOL shouldBeOn;
    2024    
    20252024    int onTime = [onDate hourOfDay] * 60 + [onDate minuteOfHour],
    20262025        offTime = [offDate hourOfDay] * 60 + [offDate minuteOfHour],
    20272026        nowTime = [nowDate hourOfDay] * 60 + [nowDate minuteOfHour];
    20282027   
    2029     if (onTime == offTime)
    2030         shouldBeOn = NO;
    2031     else if (onTime < offTime)
     2028    BOOL shouldBeOn = NO;
     2029    if (onTime < offTime)
    20322030        shouldBeOn = onTime <= nowTime && nowTime < offTime;
    2033     else
     2031    else if (onTime > offTime)
    20342032        shouldBeOn = onTime <= nowTime || nowTime < offTime;
     2033    else;
    20352034   
    20362035    if ([fDefaults boolForKey: @"SpeedLimit"] != shouldBeOn)
     
    22572256        return NSDragOperationGeneric;
    22582257    }
    2259     else;
    22602258   
    22612259    return NSDragOperationNone;
     
    23182316        }
    23192317    }
    2320     else;
    23212318   
    23222319    return YES;
  • trunk/macosx/PiecesView.m

    r3383 r3464  
    3535    if ((self = [super initWithCoder: decoder]))
    3636    {
    37         fTorrent = nil;
    3837        fPieces = malloc(MAX_ACROSS * MAX_ACROSS);
    3938    }
  • trunk/macosx/PortChecker.m

    r3454 r3464  
    4848                                cachePolicy: NSURLRequestReloadIgnoringCacheData timeoutInterval: 15.0];
    4949   
    50     NSURLConnection * portProbeConnection;
    51     if ((portProbeConnection = [NSURLConnection connectionWithRequest: portProbeRequest delegate: self]))
     50    if ([NSURLConnection connectionWithRequest: portProbeRequest delegate: self])
    5251        fPortProbeData = [[NSMutableData data] retain];
    5352    else
  • trunk/macosx/SpeedLimitToTurtleIconTransformer.m

    r3083 r3464  
    4242        return nil;
    4343   
    44     return [value boolValue] ? ([NSColor currentControlTint] == NSBlueControlTint
    45             ? [NSImage imageNamed: @"SpeedLimitButtonBlue.png"] : [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"])
     44    return [value boolValue] ? ([NSColor currentControlTint] == NSGraphiteControlTint
     45            ? [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"] : [NSImage imageNamed: @"SpeedLimitButtonBlue.png"])
    4646            : [NSImage imageNamed: @"SpeedLimitButton.png"];
    4747}
Note: See TracChangeset for help on using the changeset viewer.