Chameleon Applications

Chameleon Applications Svn Source Tree

Root/trunk/ChameleonPrefPane/Sources/AboutController.mm

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
16bundle = [NSBundle bundleForClass:[self class]];
17 sCredits = [bundle pathForResource: @"CREDITS" ofType: nil ];
18return self;
19}
20
21- (IBAction)onAbout: (id)sender
22{
23[mAboutDlg makeKeyAndOrderFront: sender];
24}
25
26- (NSString *)bundleVersionNumber {
27NSString * sVer = [[bundle infoDictionary] valueForKey:@"CFBundleVersion"];
28 NSString* revFile = [bundle pathForResource: @"version" ofType: nil ];
29NSString* rev = [NSString stringWithContentsOfFile:revFile encoding:NSUTF8StringEncoding error:nil] ;
30
31NSString * info = [[NSString alloc] initWithFormat:@"Version %@ - %@", sVer, rev ];
32return info;
33}
34
35- (NSString *)credits
36{
37NSString* s = [[NSString alloc]
38 initWithContentsOfFile:sCredits encoding: NSASCIIStringEncoding error: nil];
39return s ? s : @"";
40}
41
42@end
43
44

Archive Download this file

Revision: 441