qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu
@ 2015-01-24  1:56 Programmingkid
  2015-02-12  3:39 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2015-01-24  1:56 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel qemu-devel

This patch adds these consoles to the View menu:
VGA
QEMU Monitor
Parallel
Serial

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>

---
 ui/cocoa.m |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index d37c29b..c88c0d0 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -801,6 +801,10 @@ QemuCocoaView *cocoaView;
 - (void)toggleFullScreen:(id)sender;
 - (void)showQEMUDoc:(id)sender;
 - (void)showQEMUTec:(id)sender;
+- (void)displayVGA:(id)sender;
+- (void)displayMonitor:(id)sender;
+- (void)displayParallel:(id)sender;
+- (void)displaySerial:(id)sender;
 @end
 
 @implementation QemuCocoaAppController
@@ -943,6 +947,31 @@ QemuCocoaView *cocoaView;
     [[NSWorkspace sharedWorkspace] openFile:[NSString stringWithFormat:@"%@/../doc/qemu/qemu-tech.html",
         [[NSBundle mainBundle] resourcePath]] withApplication:@"Help Viewer"];
 }
+
+/* Displays the VGA screen */
+- (void)displayVGA:(id)sender
+{
+    console_select(0);
+}
+
+/* Displays the QEMU Monitor screen */
+- (void)displayMonitor:(id)sender
+{
+    console_select(1);
+}
+
+/* Displays the parallel port screen */
+- (void)displayParallel:(id)sender
+{
+    console_select(3);
+}
+
+/* Displays the serial port screen */
+- (void)displaySerial:(id)sender
+{
+    console_select(2);
+}
+
 @end
 
 
@@ -1006,6 +1035,11 @@ int main (int argc, const char * argv[]) {
     // View menu
     menu = [[NSMenu alloc] initWithTitle:@"View"];
     [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Enter Fullscreen" action:@selector(toggleFullScreen:) keyEquivalent:@"f"] autorelease]]; // Fullscreen
+    [menu addItem:[NSMenuItem separatorItem]]; //Separator
+    [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"VGA" action:@selector(displayVGA:) keyEquivalent:@""] autorelease]]; // VGA
+    [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"QEMU Monitor" action:@selector(displayMonitor:) keyEquivalent:@""] autorelease]]; // QEMU Monitor
+    [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Parallel" action:@selector(displayParallel:) keyEquivalent:@""] autorelease]]; // Parallel
+    [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Serial" action:@selector(displaySerial:) keyEquivalent:@""] autorelease]]; // Serial
     menuItem = [[[NSMenuItem alloc] initWithTitle:@"View" action:nil keyEquivalent:@""] autorelease];
     [menuItem setSubmenu:menu];
     [[NSApp mainMenu] addItem:menuItem];
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-14  5:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-24  1:56 [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu Programmingkid
2015-02-12  3:39 ` Peter Maydell
2015-02-12 16:10   ` Programmingkid
2015-02-12 22:03   ` Programmingkid
2015-02-13  7:45   ` Gerd Hoffmann
2015-02-13 15:37     ` Programmingkid
2015-02-14  5:48     ` [Qemu-devel] [PATCH v2] ui/cocoa.m: Adds console items to the View menu Programmingkid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).