Ignore:
Timestamp:
11/28/07 01:29:26 (16 years ago)
Author:
Nicholas Riley
Message:

English.lproj/Alarms.nib: Specify alternating row coloring in the nib,
now we're 10.4+.

English.lproj/InfoPlist.strings: Updated for 1.1b6.

English.lproj/Localizable.strings: Quote alarm message in pretty
description (used in tooltip). Change voice error now it no longer
incorporates OSStatus.

English.lproj/MainMenu.nib: Add speech prefs again; turn repetitions
field into a NJRValidatingField and hook up its delegate.

Info-Pester.plist: Updated for 1.1b6.

NJRHotKey.m: Switch to new Objective-C exception style.

NJRIntervalField.[hm]: Now a subclass of NJRValidatingField.

NJRTableDelegate.m: Get rid of our own tooltip support as NSTableView
now supports them (though with a minor visual glitch on the first
tooltip).

NJRTableView.[hm]: Remove tooltip support. Remove alternating row
coloring support.

NJRValidatingField.[hm]: Contains validation sheet stuff from
NJRIntervalField.

NJRVoicePopUpButton.[hm]: Switch to NSSpeechSynthesizer.

PSAlarm.m: Quote alarm message in pretty description (used in
tooltip). Fix repeating alarms not restoring as repeating if they
didn't expire while Pester was not running. No longer set timer on
Pester 1.0 alarm import, to help make importing atomic.

PSAlarmSetController.[hm]: Use NJRValidatingField for repetitions
field. Switch to new Objective-C exception style. Fix validation
issues on in/at changing. Temporary changes to restore speech support
and allow the sound popup to be removed entirely from the nib (rather
than being dragged out of the visible area, as it was in 1.1b5).
Changes for NSSpeechSynthesizer, which uses different voice names.

PSAlarms.m: Switch to new Objective-C exception style. Fix
duplication and error handling in Pester 1.0 alarm import, making
atomic.

PSAlarmsController.m: Use new tooltip support (since it's implemented
in the delegate rather than the data source, we have to proxy it).

PSAlerts.m: Wrap initialization in exception block so we don't leak.

PSApplication.m: Switch to new Objective-C exception style.

PSMediaAlert.m: Clamp repetitions at 1..99 so the user can't type an
invalid value, then quit and have it saved.

PSSpeechAlert.[hm]: Switch to NSSpeechSynthesizer. Throw an
intelligible exception if the voice is unavailable.

PSTimer.m: Switch to new Objective-C exception style.

Pester.xcodeproj: Remove VERSION generation; rename targets to be more
understandable.

Read Me.rtfd: Updated for 1.1b6.

SUSpeaker.[hm]: Gone in switch to NSSpeechSynthesizer.

VERSION: Gone - we use agvtool for everything now.

Updates/release-notes.html: Updated for 1.1b6.

Updates/updates.xml: Updated for 1.1b6.

package-Pester.sh: Use agvtool to get version. Atomically update
file on Web server to avoid partial downloads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSAlarms.m

    r357 r364  
    178178    unsigned indexCount = [indices count], i = 0, alarmIndex;
    179179    unsigned *indexArray = (unsigned *)malloc(indexCount * sizeof(unsigned));
    180     NS_DURING
     180    @try {
    181181        while ( (n = [e nextObject]) != nil) {
    182182            alarmIndex = [n intValue];
     
    186186        }
    187187        [alarms removeObjectsFromIndices: indexArray numIndices: indexCount];
     188    } @finally {
    188189        free(indexArray); indexArray = NULL;
    189190        [self _changed];
    190     NS_HANDLER
    191         free(indexArray);
    192         [self _changed];
    193         [localException raise];
    194     NS_ENDHANDLER
     191    }
    195192}
    196193
     
    314311    NSData *alarmData;
    315312    PSAlarm *alarm;
    316     while ( (alarmData = [e nextObject]) != nil) {
    317         NS_DURING
    318             alarm = [NSUnarchiver unarchiveObjectWithData: alarmData];
    319         NS_HANDLER
    320             alarm = nil;
    321             // XXX
    322         NS_ENDHANDLER
    323         if (alarm != nil)
    324             [alarms addObject: alarm];
     313    NSMutableArray *importedAlarms = [[NSMutableArray alloc] initWithCapacity: [alarmsData count]];
     314    @try {
     315        while ( (alarmData = [e nextObject]) != nil) {
     316            alarm = [NSUnarchiver unarchiveObjectWithData: alarmData];
     317            if (alarm == nil)
     318                @throw [NSException exceptionWithName: NSInternalInconsistencyException reason: @"Failed to decode Pester 1.0 alarm." userInfo: nil];
     319            [importedAlarms addObject: alarm];
     320            if (![alarm setTimer]) // expired
     321                [alarms addObject: alarm];
     322        }
     323    } @catch (NSException *exception) {
     324        [self removeAlarms: [NSSet setWithArray: importedAlarms]];
     325        @throw;
     326    } @finally {
     327        [importedAlarms release];
    325328    }
    326329}
Note: See TracChangeset for help on using the changeset viewer.