Ignore:
Timestamp:
11/28/07 01:29:26 (13 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/PSSpeechAlert.m

    r102 r364  
    1010#import "PSAlarmAlertController.h"
    1111#import "NSDictionary-NJRExtensions.h"
    12 #import "SUSpeaker.h"
    1312
    1413// property list keys
     
    5251    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(_stopSpeaking:) name: PSAlarmAlertStopNotification object: nil];
    5352   
    54     if ( (speaker = [[SUSpeaker alloc] init]) == nil) return;
     53    if ( (speaker = [[NSSpeechSynthesizer alloc] initWithVoice: voice]) == nil) return;
    5554    alarm = anAlarm;
    5655    [speaker setDelegate: self];
    57     unsigned voiceIndex = [[SUSpeaker voiceNames] indexOfObject: voice];
    58     if (voiceIndex == NSNotFound)
    59         voiceIndex = [[SUSpeaker voiceNames] indexOfObject: [SUSpeaker defaultVoice]];
    60     [speaker setVoice: voiceIndex + 1];
    61     [speaker speakText: [alarm message]];
     56    [speaker startSpeakingString: [alarm message]];
    6257}
    6358
     
    7469{
    7570    NSMutableDictionary *plAlert = [[super propertyListRepresentation] mutableCopy];
     71    if (voice == nil)
     72        @throw [NSException exceptionWithName: NSInvalidArgumentException
     73                                       reason: @"The selected voice is not available." userInfo: nil];
    7674    [plAlert setObject: voice forKey: PLAlertVoice];
    7775    return [plAlert autorelease];
     
    8886@end
    8987
    90 @implementation PSSpeechAlert (SUSpeakerDelegate)
     88@implementation PSSpeechAlert (NSSpeechSynthesizerDelegate)
    9189
    92 - (void)didFinishSpeaking:(SUSpeaker *)aSpeaker;
     90- (void)speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)finishedSpeaking;
    9391{
    9492    [self completedForAlarm: alarm];
Note: See TracChangeset for help on using the changeset viewer.