OSX Preference Pane and AFS Backgrounder
[openafs.git] / src / platform / DARWIN / AFSPreference / InfoController.m
1 //
2 //  InfoCommander.m
3 //  AFSCommander
4 //
5 //  Created by Claudio Bisegni on 06/07/07.
6 //  Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
7 //
8
9 #import "InfoController.h"
10
11
12 @implementation InfoController
13 // -------------------------------------------------------------------------------
14 //  awakeFromNib:
15 // -------------------------------------------------------------------------------
16 - (void)awakeFromNib
17 {
18         htmlLicence = nil;
19 }
20
21 // -------------------------------------------------------------------------------
22 //  awakeFromNib:
23 // -------------------------------------------------------------------------------
24 - (void)showHtmlResource :(NSString*)resourcePath
25 {
26         NSData *rtfData = [NSData dataWithContentsOfFile:resourcePath];
27         htmlLicence = [[NSAttributedString alloc] initWithRTF:rtfData 
28                                                                                 documentAttributes:nil];
29         [[((NSTextView*) texEditInfo ) textStorage] setAttributedString:htmlLicence];
30 }
31
32
33 // -------------------------------------------------------------------------------
34 //  awakeFromNib:
35 // -------------------------------------------------------------------------------
36 - (IBAction) closePanel:(id) sender
37 {
38         if(htmlLicence) [htmlLicence release];
39         [NSApp endSheet:infoPanel];
40 }
41 @end