ftp.nice.ch/pub/next/connectivity/protocol/Remotes3.0.NIHS.bs.tar.gz#/Remotes3.0.NIHS.bs/Source/Info.m

This is Info.m in view mode; [Download] [Up]

/*---------------------------------------------------------------------------
Info.m -- Display the info panel.

Copyright (c) 1992 The University of Iowa

This code manages the info panel.  Upon initialization, the Info.nib file is
loaded.

Rex Pruess <Rex-Pruess@uiowa.edu>

$Header: /rpruess/apps/Remotes3.0/RCS/Info.m,v 3.0 92/09/23 21:45:07 rpruess Exp $
-----------------------------------------------------------------------------
$Log:	Info.m,v $
Revision 3.0  92/09/23  21:45:07  rpruess
At NeXT System Release 3.0, I separated the info.nib panel from the main
nib file.

---------------------------------------------------------------------------*/

/* Appkit header files */
#import <appkit/Application.h>
#import <appkit/Control.h>
#import <appkit/Panel.h>

/* Application class header files */
#import "Info.h"
#import "GNULicense.h"

@implementation Info

/*---------------------------------------------------------------------------
When the info panel is requested the first time, we must do some work.
-----------------------------------------------------------------------------*/
- init
{
   self = [super init];

   [NXApp loadNibSection:"Info.nib" owner:self withNames:NO];
   [infoPanel setMiniwindowIcon:"app"];

   myGNULicense = nil;

   return self;
}

/*---------------------------------------------------------------------------
Show 'em the info panel.
-----------------------------------------------------------------------------*/
- showInfoPanel:sender
{
   [infoPanel makeKeyAndOrderFront:self];
   return self;
}

/*---------------------------------------------------------------------------
Display the GNU license.
-----------------------------------------------------------------------------*/
- showGNULicense:sender
{
   if (myGNULicense == nil)
      myGNULicense = [[GNULicense alloc] init];

   /*** Not really necessary, but kinda cutesy. */
   if ([sender isKindOf:[Control class]] == YES) {
      [sender setTarget:myGNULicense];
      [sender setAction:@selector (showLicense:)];
   }

   [myGNULicense showLicense:self];
   return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.