Last change
on this file since 325 was 53, checked in by Nicholas Riley, 22 years ago |
Updated for Pester 1.1a5 (very limited release).
Pester 1.1a4 was never released.
|
File size:
1.1 KB
|
Line | |
---|
1 | //
|
---|
2 | // PSDockBounceAlert.m
|
---|
3 | // Pester
|
---|
4 | //
|
---|
5 | // Created by Nicholas Riley on Sat Oct 26 2002.
|
---|
6 | // Copyright (c) 2002 Nicholas Riley. All rights reserved.
|
---|
7 | //
|
---|
8 |
|
---|
9 | #import <AppKit/AppKit.h>
|
---|
10 | #import "PSDockBounceAlert.h"
|
---|
11 |
|
---|
12 | static PSDockBounceAlert *PSDockBounceAlertShared;
|
---|
13 |
|
---|
14 | @implementation PSDockBounceAlert
|
---|
15 |
|
---|
16 | + (PSAlert *)alert;
|
---|
17 | {
|
---|
18 | if (PSDockBounceAlertShared == nil)
|
---|
19 | PSDockBounceAlertShared = [[PSDockBounceAlert alloc] init];
|
---|
20 | return PSDockBounceAlertShared;
|
---|
21 | }
|
---|
22 |
|
---|
23 | + (void)stopBouncing;
|
---|
24 | {
|
---|
25 | [NSApp cancelUserAttentionRequest: NSInformationalRequest];
|
---|
26 | }
|
---|
27 |
|
---|
28 | - (void)triggerForAlarm:(PSAlarm *)alarm;
|
---|
29 | {
|
---|
30 | [NSApp requestUserAttention: NSInformationalRequest];
|
---|
31 | [[self class] performSelector: @selector(stopBouncing) withObject: nil afterDelay: 1 inModes: [NSArray arrayWithObject: NSDefaultRunLoopMode]];
|
---|
32 | [self completedForAlarm: alarm];
|
---|
33 | }
|
---|
34 |
|
---|
35 | - (NSAttributedString *)actionDescription;
|
---|
36 | {
|
---|
37 | return [@"Bounce dock icon" small];
|
---|
38 | }
|
---|
39 |
|
---|
40 | #pragma mark property list serialization (Pester 1.1)
|
---|
41 |
|
---|
42 | - (id)initWithPropertyList:(NSDictionary *)dict;
|
---|
43 | {
|
---|
44 | [self release];
|
---|
45 | return [[PSDockBounceAlert alert] retain];
|
---|
46 | }
|
---|
47 |
|
---|
48 | @end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.