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

trivial code cleanup

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.