forked from millenomi/afloat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAfloat_AfloatNagging.m
More file actions
29 lines (24 loc) · 840 Bytes
/
Afloat_AfloatNagging.m
File metadata and controls
29 lines (24 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// Afloat_AfloatNagging.m
// Afloat
//
// Created by ∞ on 29/03/08.
// Copyright 2008 Emanuele Vulcano. All rights reserved.
//
#import "Afloat_AfloatNagging.h"
#import <Carbon/Carbon.h>
#import "AfloatNagPreferences.h"
@implementation Afloat (AfloatNagging)
- (void) checkForNagOnInstall {
#if kAfloatEnableNag
#warning Nagging is enabled.
if (!AfloatNagGetPreferenceForKey(kAfloatInstallationDateKey, [NSDate class]))
AfloatNagSetPreferenceForKey(kAfloatInstallationDateKey, [NSDate date]);
if (AfloatNagCurrentAction() != kAfloatDoNotShowAlerts) {
NSBundle* b = [NSBundle bundleForClass:[self class]];
NSString* donateApp = [[[b bundlePath] stringByAppendingPathComponent:@"Contents"] stringByAppendingPathComponent:@"Donate for Afloat.app"];
[[NSWorkspace sharedWorkspace] openFile:donateApp];
}
#endif
}
@end