1 | //␊ |
2 | // About.mm␊ |
3 | // ChameleonPrefPane␊ |
4 | //␊ |
5 | // Created by Rekursor on 1/27/10.␊ |
6 | //␊ |
7 | ␊ |
8 | #import "AboutController.h"␊ |
9 | ␊ |
10 | ␊ |
11 | @implementation AboutController␊ |
12 | - (id) init␊ |
13 | {␊ |
14 | ␉[super init];␊ |
15 | ␊ |
16 | ␉bundle = [NSBundle bundleForClass:[self class]];␊ |
17 | sCredits = [bundle pathForResource: @"CREDITS" ofType: nil ];␊ |
18 | ␉return self;␊ |
19 | }␊ |
20 | ␊ |
21 | - (IBAction)onAbout: (id)sender␊ |
22 | {␊ |
23 | ␉[mAboutDlg makeKeyAndOrderFront: sender];␊ |
24 | }␊ |
25 | ␊ |
26 | - (NSString *)bundleVersionNumber {␊ |
27 | ␉NSString * sVer = [[bundle infoDictionary] valueForKey:@"CFBundleVersion"];␊ |
28 | ␉NSString * info = [[NSString alloc] initWithFormat:@"Version %@", sVer ];␊ |
29 | ␉return info;␊ |
30 | }␊ |
31 | ␊ |
32 | - (NSString *)credits␊ |
33 | {␊ |
34 | ␉NSString* s = [[NSString alloc] ␊ |
35 | ␉␉␉␉ initWithContentsOfFile:sCredits encoding: NSASCIIStringEncoding error: nil];␊ |
36 | ␉return s ? s : @"";␊ |
37 | }␊ |
38 | ␊ |
39 | @end␊ |
40 | ␊ |
41 | |