Make the help menus actually work.
Signed-off-by: John Arbuckle <[email protected]>
---
ui/cocoa.m | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 334e6f6..2c81785 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -992,16 +992,28 @@ QemuCocoaView *cocoaView;
{
COCOA_DEBUG("QemuCocoaAppController: showQEMUDoc\n");
- [[NSWorkspace sharedWorkspace] openFile:[NSString
stringWithFormat:@"%@/../doc/qemu/qemu-doc.html",
- [[NSBundle mainBundle] resourcePath]] withApplication:@"Help Viewer"];
+ NSString *path;
+ path = [[NSBundle mainBundle] resourcePath];
+ path = [path stringByDeletingLastPathComponent];
+ path = [NSString stringWithFormat: @"%@/%s", path, "qemu-doc.html"];
+ if([[NSWorkspace sharedWorkspace] openFile: path] == NO) {
+ NSBeep();
+ QEMU_Alert(@"Failed to open file qemu-doc.html!");
+ }
}
- (void)showQEMUTec:(id)sender
{
COCOA_DEBUG("QemuCocoaAppController: showQEMUTec\n");
- [[NSWorkspace sharedWorkspace] openFile:[NSString
stringWithFormat:@"%@/../doc/qemu/qemu-tech.html",
- [[NSBundle mainBundle] resourcePath]] withApplication:@"Help Viewer"];
+ NSString *path;
+ path = [[NSBundle mainBundle] resourcePath];
+ path = [path stringByDeletingLastPathComponent];
+ path = [NSString stringWithFormat: @"%@/%s", path, "qemu-tech.html"];
+ if([[NSWorkspace sharedWorkspace] openFile: path] == NO) {
+ NSBeep();
+ QEMU_Alert(@"Failed to open file qemu-tech.html!");
+ }
}
/* Stretches video to fit host monitor size */
--
1.7.5.4