[Scopeapp-cvs]scopeapp/src ScopeAppDelegate.h,1.10,1.11 ScopeAppDelegate.m,1.16,1.17
Status: Alpha
Brought to you by:
narge
From: <sco...@li...> - 2002-12-10 15:01:16
|
Update of /cvsroot/scopeapp/scopeapp/src In directory sc8-pr-cvs1:/tmp/cvs-serv19179 Modified Files: ScopeAppDelegate.h ScopeAppDelegate.m Log Message: Add code to show license window. Index: ScopeAppDelegate.h =================================================================== RCS file: /cvsroot/scopeapp/scopeapp/src/ScopeAppDelegate.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ScopeAppDelegate.h 29 Oct 2002 06:10:43 -0000 1.10 --- ScopeAppDelegate.h 10 Dec 2002 15:01:11 -0000 1.11 *************** *** 30,33 **** --- 30,35 ---- @interface ScopeAppDelegate : NSObject { + IBOutlet NSWindow* myLicenseWindow; + IBOutlet NSTextView* myLicenseText; } *************** *** 39,42 **** --- 41,46 ---- - (void) applicationDidFinishLaunching: (NSNotification *)not; + + - (IBAction) orderFrontLicensePanel: (id) sender; @end Index: ScopeAppDelegate.m =================================================================== RCS file: /cvsroot/scopeapp/scopeapp/src/ScopeAppDelegate.m,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ScopeAppDelegate.m 5 Dec 2002 15:09:47 -0000 1.16 --- ScopeAppDelegate.m 10 Dec 2002 15:01:11 -0000 1.17 *************** *** 50,53 **** --- 50,55 ---- //[controller autorelease]; } + + myLicenseWindow = nil; } *************** *** 61,64 **** --- 63,88 ---- { return YES; // FIXME change after adding support for reading from files ? + } + + - (IBAction) orderFrontLicensePanel: (id) sender + { + if(myLicenseWindow == nil) + { + [NSBundle loadNibNamed:@"LicenseWindow" owner: self]; + [myLicenseText readRTFDFromFile: + [[NSBundle mainBundle] + pathForResource: @"License" + ofType: @"rtf"]]; + } + + [myLicenseWindow makeKeyAndOrderFront: self]; + } + + - (void) dealloc + { + if(myLicenseWindow != nil) + { + [myLicenseWindow release]; + } } |