Changeset 61 for trunk/Cocoa/Pester/Source/PSAlarmSetController.m
- Timestamp:
- 01/06/03 13:05:29 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSAlarmSetController.m
r60 r61 27 27 #import "PSMovieAlert.h" 28 28 #import "PSSpeechAlert.h" 29 #import "PSWakeAlert.h" 29 30 30 31 /* Bugs to file: … … 124 125 [notificationCenter addObserver: self selector: @selector(applicationWillHide:) name: NSApplicationWillHideNotification object: NSApp]; 125 126 [notificationCenter addObserver: self selector: @selector(applicationDidUnhide:) name: NSApplicationDidUnhideNotification object: NSApp]; 127 [notificationCenter addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: NSApp]; 126 128 [voice setDelegate: self]; // XXX why don't we do this in IB? It should use the accessor... 127 129 [wakeUp setEnabled: [PSPowerManager autoWakeSupported]]; … … 380 382 [doSpeak setIntValue: YES]; 381 383 [voice setVoice: [(PSSpeechAlert *)alert voice]]; 382 } 383 } 384 } else if ([alert isKindOfClass: [PSWakeAlert class]]) { 385 [wakeUp setIntValue: YES]; 386 } 387 } 384 388 } 385 389 … … 417 421 if ([doSpeak intValue]) 418 422 [alerts addAlert: [PSSpeechAlert alertWithVoice: [voice titleOfSelectedItem]]]; 423 // wake alert 424 if ([wakeUp intValue]) 425 [alerts addAlert: [PSWakeAlert alert]]; 419 426 [[NSUserDefaults standardUserDefaults] setObject: [alerts propertyListRepresentation] forKey: PSAlertsSelected]; 420 427 NS_HANDLER … … 525 532 @implementation PSAlarmSetController (NSApplicationNotifications) 526 533 534 - (void)applicationWillTerminate:(NSNotification *)notification; 535 { 536 [self _setAlerts]; 537 } 538 527 539 - (void)applicationWillHide:(NSNotification *)notification; 528 540 { 529 541 if ([[self window] isVisible]) { 530 NSLog(@"hide");531 542 [self silence: nil]; 532 543 [self _stopUpdateTimer]; … … 537 548 { 538 549 if ([[self window] isVisible]) { 539 NSLog(@"unhide");540 550 [self update: self]; 541 551 }
Note:
See TracChangeset
for help on using the changeset viewer.