qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu


From: Programmingkid
Subject: Re: [Qemu-devel] [PATCH] cocoa.m: Adds console items to the view menu
Date: Thu, 12 Feb 2015 11:10:34 -0500

On Feb 11, 2015, at 10:39 PM, Peter Maydell wrote:

> On 24 January 2015 at 01:56, Programmingkid <address@hidden> wrote:
>> This patch adds these consoles to the View menu:
>> VGA
>> QEMU Monitor
>> Parallel
>> Serial
>> 
>> Signed-off-by: John Arbuckle <address@hidden>
> 
>> +/* 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);
>> +}
> 
> 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).
> 
> 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?
> 

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. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]