qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Programmingkid <programmingkidx@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu
Date: Fri, 23 Jan 2015 20:56:23 -0500	[thread overview]
Message-ID: <82FF5E7D-9716-476C-BBA5-56223DCB6023@gmail.com> (raw)

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

             reply	other threads:[~2015-01-24  1:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24  1:56 Programmingkid [this message]
2015-02-12  3:39 ` [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82FF5E7D-9716-476C-BBA5-56223DCB6023@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).