source: trunk/Cocoa/Pester/Source/PSAlarmNotifierController.m@ 26

Last change on this file since 26 was 26, checked in by Nicholas Riley, 20 years ago

Pester 1.0b1

File size: 966 bytes
Line 
1//
2// PSAlarmNotifierController.m
3// Pester
4//
5// Created by Nicholas Riley on Tue Oct 08 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import "PSAlarmNotifierController.h"
10#import "PSAlarm.h"
11
12@implementation PSAlarmNotifierController
13
14// XXX should use NSNonactivatingPanelMask on 10.2
15
16+ (PSAlarmNotifierController *)controllerWithTimerExpiredNotification:(NSNotification *)notification;
17{
18 return [[self alloc] initWithAlarm: [notification object]];
19}
20
21- (id)initWithAlarm:(PSAlarm *)alarm;
22{
23 if ([self initWithWindowNibName: @"Notifier"]) {
24 [[self window] center];
25 [messageField setStringValue: [alarm message]];
26 [dateField setObjectValue: [alarm date]];
27 [NSApp activateIgnoringOtherApps: YES];
28 [[self window] makeKeyAndOrderFront: nil];
29 [[self window] orderFrontRegardless];
30 NSBeep();
31 }
32 return self;
33}
34
35- (IBAction)close:(id)sender;
36{
37 [self close];
38}
39
40@end
Note: See TracBrowser for help on using the repository browser.