3 * The Cheat - The legendary universal game trainer for Mac OS X.
4 * http://www.brokenzipper.com/trac/wiki/TheCheat
6 * Copyright (c) 2003-2011, Charles McGarvey et al.
8 * Distributable under the terms and conditions of the 2-clause BSD
9 * license; see the file COPYING for the legal text of the license.
12 #import "HelpController.h"
15 @implementation HelpController
20 return [super initWithWindowNibName
:@
"Help"];
25 NSString
*filepath
= [[NSBundle mainBundle
] pathForResource
:@
"Help" ofType
:@
"html"];
27 NSURLRequest
*request
;
33 url
= [NSURL fileURLWithPath
:filepath
];
34 request
= [NSURLRequest requestWithURL
:url
];
36 [[webView mainFrame
] loadRequest
:request
];
41 - (void)webView
:(WebView
*)sender decidePolicyForNavigationAction
:(NSDictionary
*)actionInformation request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id<WebPolicyDecisionListener
>)listener
43 NSURL
*url
= [request URL
];
45 // open "http" and "mailto" links in a real browser or email client
46 if ( [[url scheme
] isEqualToString
:@
"http"] ||
[[url scheme
] isEqualToString
:@
"mailto"] ) {
47 [[NSWorkspace sharedWorkspace
] openURL
:url
];