Help menu in Tux Paint for Mac OS X now links to documentation.

This commit is contained in:
Martin Fuhrer 2006-10-18 05:42:53 +00:00
parent 45c1613e07
commit e4aac9ff0e
2 changed files with 8 additions and 2 deletions

View file

@ -81,6 +81,12 @@ static NSString *getApplicationName(void)
} else } else
[super sendEvent: anEvent]; [super sendEvent: anEvent];
} }
- (void)tuxpaintHelp:(id)sender
{
NSString* helpPath = [[NSBundle mainBundle] pathForResource:@"README" ofType:@"html" inDirectory:@"html"];
[[NSWorkspace sharedWorkspace] openFile:helpPath];
}
@end @end
@ -253,7 +259,7 @@ static void setupHelpMenu(void)
/* "Help" item */ /* "Help" item */
NSString *appName = getApplicationName(); NSString *appName = getApplicationName();
menuItem = [[NSMenuItem alloc] initWithTitle:[appName stringByAppendingString:@" Help"] action:@selector(showHelp:) keyEquivalent:@"?"]; menuItem = [[NSMenuItem alloc] initWithTitle:[appName stringByAppendingString:@" Help"] action:@selector(tuxpaintHelp:) keyEquivalent:@"?"];
[helpMenu addItem:menuItem]; [helpMenu addItem:menuItem];
[menuItem release]; [menuItem release];