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
[super sendEvent: anEvent];
}
- (void)tuxpaintHelp:(id)sender
{
NSString* helpPath = [[NSBundle mainBundle] pathForResource:@"README" ofType:@"html" inDirectory:@"html"];
[[NSWorkspace sharedWorkspace] openFile:helpPath];
}
@end
@ -253,7 +259,7 @@ static void setupHelpMenu(void)
/* "Help" item */
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];
[menuItem release];

View file

@ -16,7 +16,7 @@ struct WrapperDataStruct
{
char dataPath[2048]; // path to data folder inside application bundle
char preferencesPath[2048]; // path to the user's preferences folder
char fontsPath[2048]; // path to the user's fonts folder
char fontsPath[2048]; // path to the user's fonts folder
int foundSDL; // was SDL.framework found?
int foundSDL_image; // was SDL_image.framework found?
int foundSDL_mixer; // was SDL_mixer.framework found?