Extra methods for new Help menu items

This commit is contained in:
nigel 2003-01-10 23:01:48 +00:00
parent 25ea75ff32
commit 5a9ec56a21
2 changed files with 37 additions and 0 deletions

View File

@ -40,6 +40,10 @@
- (void) dispatchEvent: (NSEvent *)event
type: (NSEventType)type;
- (IBAction) HelpToDo: (id)sender;
- (IBAction) HelpVersions: (id)sender;
#ifdef ENABLE_MULTIPLE
- (IBAction) NewEmulator: (id)sender;
- (IBAction) PauseAll: (id)sender;

View File

@ -33,6 +33,7 @@
#define DEBUG 0
#import <debug.h>
#import "misc_macosx.h"
#import "video_macosx.h"
//
@ -248,6 +249,38 @@
[super sendEvent: event];
}
// Methods to display documentation:
- (IBAction) HelpToDo: (id)sender
{
NSString *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
ofType: @"html"];
if ( ! path )
InfoSheet(@"Cannot find ToDo.html", [theEmulator window]);
else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] )
InfoSheet(@"Cannot open ToDo.html with TextEdit", [theEmulator window]);
}
- (IBAction) HelpVersions: (id)sender
{
NSString *path = [[NSBundle mainBundle] pathForResource: @"Versions"
ofType: @"html"];
if ( ! path )
InfoSheet(@"Cannot find Versions.html", [theEmulator window]);
else
if ( ! [[NSWorkspace sharedWorkspace] openFile: path
withApplication: @"TextEdit"] )
InfoSheet(@"Cannot open Versions.html with TextEdit", [theEmulator window]);
}
// Menu items which for managing more than one window
#ifdef ENABLE_MULTIPLE
- (IBAction) NewEmulator: (id)sender