Received: from eggs.gnu.org ([2001:4830:134:3::10]:57906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwLj-0003mm-BI for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:10:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLwLe-0003Ht-3k for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:10:43 -0500 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:53917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwLd-0003Hk-PJ for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:10:37 -0500 Received: by mail-qa0-f43.google.com with SMTP id bm13so8264414qab.2 for ; Thu, 12 Feb 2015 08:10:37 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Thu, 12 Feb 2015 11:10:34 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <964468BD-E9D2-4E2A-830C-3ECD8DC7CB3D@gmail.com> References: <82FF5E7D-9716-476C-BBA5-56223DCB6023@gmail.com> Subject: Re: [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel , Gerd Hoffmann On Feb 11, 2015, at 10:39 PM, Peter Maydell wrote: > On 24 January 2015 at 01:56, Programmingkid = wrote: >> This patch adds these consoles to the View menu: >> VGA >> QEMU Monitor >> Parallel >> Serial >>=20 >> Signed-off-by: John Arbuckle >=20 >> +/* 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); >> +} >=20 > I'm afraid this doesn't work, because there's no guarantee > that these consoles will be created or in this order. > They just happen to be the set you get for the x86 > PC model. If you boot a versatilepb ARM image with the > serial output directed to stdio, for instance, then the > "serial" entry in the menu gets you the parallel > port console, and the parallel port entry does nothing, > because this board and config happens to end up creating > only 3 consoles, not 4 (graphics, monitor, parallel). >=20 > We're going to need to automatically create and update > the menu entries based on which consoles get created > if we want this to work properly, I think. Gerd, any > suggestions? Is there a hook for "list of active > consoles has changed"? What's the right way to get > the printable name of a console? >=20 I was hoping the gtk.c file would have some code I could use, but it = doesn't. My model for these menu items came from a YouTube video = demonstrating the GTK UI in QEMU. Does QEMU still have these menu items = in the GTK UI? The gtk.c file does not seem to indicate that.=20=