Changeset 522 for trunk/Cocoa/Pester/Source/PSAlarmSetController.m
- Timestamp:
- 05/25/09 03:21:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSAlarmSetController.m
r364 r522 114 114 [voice setDelegate: self]; // XXX why don't we do this in IB? It should use the accessor... 115 115 [wakeUp setEnabled: [PSPowerManager autoWakeSupported]]; 116 116 117 // XXX workaround for 10.1.x and 10.2.x bug which sets the first responder to the wrong field alternately, but it works if I set the initial first responder to nil... go figure. 117 [[self window] setInitialFirstResponder: nil]; 118 [[self window] makeKeyAndOrderFront: nil]; 118 NSWindow *window = [self window]; 119 [window setInitialFirstResponder: nil]; 120 [window makeKeyAndOrderFront: nil]; 119 121 } 120 122 … … 422 424 while ( (alert = [e nextObject]) != nil) { 423 425 if ([alert isKindOfClass: [PSDockBounceAlert class]]) { 424 [bounceDockIcon set State: NSOnState];426 [bounceDockIcon setIntValue: YES]; // temporary for 1.1b8 425 427 } else if ([alert isKindOfClass: [PSScriptAlert class]]) { 426 428 [doScript setIntValue: YES]; … … 455 457 @try { 456 458 // dock bounce alert 457 if ([bounceDockIcon state] == NSOnState)459 if ([bounceDockIcon intValue]) // temporary for 1.1b8 458 460 [alerts addAlert: [PSDockBounceAlert alert]]; 459 461 // script alert … … 500 502 - (IBAction)showWindow:(id)sender; 501 503 { 502 if (![[self window] isVisible]) { 504 NSWindow *window = [self window]; 505 506 if (![window isVisible]) { 503 507 NSDate *today = [NSCalendarDate dateForDay: [NSDate date]]; 504 508 if ([(NSDate *)[timeDate objectValue] compare: today] == NSOrderedAscending) { … … 507 511 [self update: self]; 508 512 // XXX bug workaround - otherwise, first responder appears to alternate every time the window is shown. And if you set the initial first responder, you can't tab in the window. :( 509 [[self window] makeFirstResponder: [[self window] initialFirstResponder]]; 510 } 513 [window makeFirstResponder: [window initialFirstResponder]]; 514 } 515 511 516 [super showWindow: sender]; 512 517 }
Note:
See TracChangeset
for help on using the changeset viewer.