Changeset 753


Ignore:
Timestamp:
Aug 11, 2006, 11:18:56 PM (15 years ago)
Author:
livings124
Message:

Streamlined autoenable function a little.

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r752 r753  
    12671267        return;
    12681268   
    1269     BOOL rangeForOn = onHour < offHour;
    1270     int min, max;
    1271     if (rangeForOn)
    1272     {
    1273         min = onHour;
    1274         max = offHour;
    1275     }
     1269    BOOL shouldBeOn;
     1270    int hour = [[NSCalendarDate calendarDate] hourOfDay];
     1271    if (onHour < offHour)
     1272        shouldBeOn = hour >= onHour && hour < offHour;
    12761273    else
    1277     {
    1278         min = offHour;
    1279         max = onHour;
    1280     }
    1281    
    1282     int hour = [[NSCalendarDate calendarDate] hourOfDay];
    1283     BOOL inRange = hour >= min && hour < max;
    1284    
    1285     if ((!fSpeedLimitEnabled && (rangeForOn == inRange)) || (fSpeedLimitEnabled && (rangeForOn != inRange)))
     1274        shouldBeOn = hour < offHour || hour >= onHour;
     1275   
     1276    if ((!fSpeedLimitEnabled && shouldBeOn) || (fSpeedLimitEnabled && !shouldBeOn))
    12861277    {
    12871278        [self toggleSpeedLimit: nil];
  • trunk/macosx/English.lproj/PrefsWindow.nib/info.nib

    r752 r753  
    88        <dict>
    99                <key>153</key>
    10                 <string>119 348 584 311 0 0 1152 842 </string>
     10                <string>285 423 582 311 0 0 1152 842 </string>
    1111                <key>28</key>
    1212                <string>58 372 582 290 0 0 1152 842 </string>
Note: See TracChangeset for help on using the changeset viewer.