SpeechDisplay: fix at the request of Peter Accessibility on growl-discuss, the speech display wasn't reading the title of the notification, only the description
authorRudy Richter
Sat Oct 03 10:54:51 2009 -0400 (2009-10-03)
changeset 447749d5f4f052c8
parent 4476 7ca311987e91
child 4482 1118072102a1
child 4485 2eca58333ab2
SpeechDisplay: fix at the request of Peter Accessibility on growl-discuss, the speech display wasn't reading the title of the notification, only the description
Plugins/Displays/Speech/GrowlSpeechDisplay.m
     1.1 --- a/Plugins/Displays/Speech/GrowlSpeechDisplay.m	Sat Oct 03 10:36:28 2009 -0400
     1.2 +++ b/Plugins/Displays/Speech/GrowlSpeechDisplay.m	Sat Oct 03 10:54:51 2009 -0400
     1.3 @@ -36,17 +36,19 @@
     1.4  	} else {
     1.5  		voice = [NSSpeechSynthesizer defaultVoice];
     1.6  	}
     1.7 +	NSString *title = [notification title];
     1.8 +	NSString *desc = [notification notificationDescription];
     1.9  	
    1.10 -	NSString *desc = [notification notificationDescription];
    1.11 -
    1.12 +	NSString *summary = [NSString stringWithFormat:@"%@\n\n%@", title, desc];
    1.13 +	
    1.14  	NSSpeechSynthesizer *syn = [[NSSpeechSynthesizer alloc] initWithVoice:voice];
    1.15 -	[syn startSpeakingString:desc];
    1.16 +	[syn startSpeakingString:summary];
    1.17  
    1.18  	NSDictionary *noteDict = [notification dictionaryRepresentation];
    1.19  	if (getBooleanForKey(noteDict, GROWL_SCREENSHOT_MODE)) {
    1.20  		NSString *path = [[[GrowlPathUtilities screenshotsDirectory] stringByAppendingPathComponent:[GrowlPathUtilities nextScreenshotName]] stringByAppendingPathExtension:@"aiff"];
    1.21  		NSURL *url = [[NSURL alloc] initFileURLWithPath:path];
    1.22 -		[syn startSpeakingString:desc toURL:url];
    1.23 +		[syn startSpeakingString:summary toURL:url];
    1.24  		[url release];
    1.25  	}
    1.26