qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4] ui/cocoa.m: Adds console items to the View m


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v4] ui/cocoa.m: Adds console items to the View menu
Date: Mon, 11 May 2015 14:20:49 +0100

On 11 May 2015 at 01:32, Programmingkid <address@hidden> wrote:
> This patch adds the VGA, Monitor, Serial, and Parallel menu item to the view
> menu.
>
> Signed-off-by: John Arbuckle <address@hidden>

> +    // set the console variables for the consoles we have
> +    while(qemu_console_lookup_by_index(index) != NULL) {
> +        console_name =
> qemu_console_get_label(qemu_console_lookup_by_index(index));
> +        if(strstr(console_name, "VGA") != NULL) {
> +            graphics_console = index;
> +        } else if (strstr(console_name, "monitor") != NULL) {
> +            monitor_console = index;
> +        } else if (strstr(console_name, "serial") != NULL) {
> +            serial_console = index;
> +        } else if (strstr(console_name, "parallel") != NULL) {
> +            parallel_console = index;
> +        } else {
> +            printf("Error in initConsoleVariables(): given value %s\n",
> console_name);

Can't we just create a menu with an item for every console,
and set its menu text to the result of qemu_console_get_label() ?
I don't see why we need to special case these four and only
display those.

thanks
-- PMM



reply via email to

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