[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] ui/cocoa.m: fix help menus
From: |
Programmingkid |
Subject: |
[Qemu-devel] [PATCH] ui/cocoa.m: fix help menus |
Date: |
Sun, 27 Sep 2015 10:31:18 -0400 |
Make the help menus actually work.
Signed-off-by: John Arbuckle <address@hidden>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] ui/cocoa.m: fix help menus,
Programmingkid <=