Ignore:
Timestamp:
07/18/09 05:59:22 (15 years ago)
Author:
Nicholas Riley
Message:

Maximum interval is now 999 weeks.

Location:
trunk/Cocoa/Pester/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/English.lproj/MainMenu.nib/classes.nib

    r545 r551  
    1717                        <key>SUPERCLASS</key>
    1818                        <string>NSPopUpButton</string>
     19                </dict>
     20                <dict>
     21                        <key>CLASS</key>
     22                        <string>NSDisclosureButtonCell</string>
     23                        <key>LANGUAGE</key>
     24                        <string>ObjC</string>
     25                        <key>SUPERCLASS</key>
     26                        <string>NSButtonCell</string>
    1927                </dict>
    2028                <dict>
     
    119127                </dict>
    120128                <dict>
    121                         <key>CLASS</key>
    122                         <string>NSDisclosureButtonCell</string>
    123                         <key>LANGUAGE</key>
    124                         <string>ObjC</string>
    125                         <key>SUPERCLASS</key>
    126                         <string>NSButtonCell</string>
    127                 </dict>
    128                 <dict>
    129129                        <key>ACTIONS</key>
    130130                        <dict>
  • trunk/Cocoa/Pester/Source/English.lproj/MainMenu.nib/info.nib

    r533 r551  
    1111        <key>IBOpenObjects</key>
    1212        <array>
    13                 <integer>507</integer>
     13                <integer>2</integer>
    1414        </array>
    1515        <key>IBSystem Version</key>
  • trunk/Cocoa/Pester/Source/PSAlarm.m

    r366 r551  
    328328- (NSString *)intervalString;
    329329{
    330     const unsigned long long mval = 99, minute = 60, hour = minute * 60;
     330    const unsigned long long mval = 999, minute = 60, hour = minute * 60, day = hour * 24, week = day * 7;
    331331    unsigned long long interval = [self interval];
    332332    if (interval == 0) return nil;
     333
    333334    if (interval == 1) return @"One second";
    334335    if (interval == minute) return @"One minute";
     336    if (interval == hour) return @"One hour";
     337    if (interval == day) return @"One day";
     338    if (interval == week) return @"One week";
     339
     340    if (interval % week == 0) return [NSString stringWithFormat: @"%u weeks", (unsigned)(interval / week)];
     341    if (interval % day == 0) return [NSString stringWithFormat: @"%u days", (unsigned)(interval / day)];
     342    if (interval % hour == 0) return [NSString stringWithFormat: @"%u hours", (unsigned)(interval / hour)];
    335343    if (interval % minute == 0) return [NSString stringWithFormat: @"%u minutes", (unsigned)(interval / minute)];
     344   
    336345    if (interval <= mval) return [NSString stringWithFormat: @"%u seconds", (unsigned)interval];
    337     if (interval == hour) return @"One hour";
    338     if (interval % hour == 0) return [NSString stringWithFormat: @"%u hours", (unsigned)(interval / hour)];
    339346    if (interval <= mval * minute) return [NSString stringWithFormat: @"%u minutes", (unsigned)(interval / minute)];
    340347    if (interval <= mval * hour) return [NSString stringWithFormat: @"%u hours", (unsigned)(interval / hour)];
     348    if (interval <= mval * day) return [NSString stringWithFormat: @"%u days", (unsigned)(interval / day)];
     349    return [NSString stringWithFormat: @"%u weeks", (unsigned)(interval / week)];
     350
    341351    return [self _stringForInterval: interval];
    342352}
Note: See TracChangeset for help on using the changeset viewer.