qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Adds console items to the View menu
Date: Sun, 10 May 2015 20:27:46 +0100

On 14 February 2015 at 15:50, Programmingkid <address@hidden> wrote:
> Adds these items to the View menu:
> VGA
> Monitor
> Serial
> Parallel
>
> Signed-off-by: John Arbuckle <address@hidden>

> +// Creates the view menu
> +static void create_view_menu()
> +{
> +    NSMenu * menu;
> +    NSMenuItem * menuItem;
> +    menu = [[NSMenu alloc] initWithTitle:@"View"];
> +    [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Enter Fullscreen"
> action:@selector(toggleFullScreen:) keyEquivalent:@"f"] autorelease]]; //
> Fullscreen
> +    [menu addItem:[NSMenuItem separatorItem]]; //Separator
> +    if(get_console_index("graphic") != -1)
> +        [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"VGA"
> action:@selector(displayVGA:) keyEquivalent:@""] autorelease]]; // VGA
> +    if(get_console_index("monitor") != -1)
> +        [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"QEMU Monitor"
> action:@selector(displayMonitor:) keyEquivalent:@""] autorelease]]; // QEMU
> Monitor
> +    if (get_console_index("serial") != -1)
> +        [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Serial"
> action:@selector(displaySerial:) keyEquivalent:@""] autorelease]]; // Serial
> +    if(get_console_index("parallel") != -1)
> +        [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"Parallel"
> action:@selector(displayParallel:) keyEquivalent:@""] autorelease]]; //
> Parallel
> +    menuItem = [[[NSMenuItem alloc] initWithTitle:@"View" action:nil
> keyEquivalent:@""] autorelease];
> +    [menuItem setSubmenu:menu];
> +    [[NSApp mainMenu] insertItem: menuItem atIndex: 1]; // insert View menu
> after Application menu
> +}
> +

This patch needs to be reworked to use the new qemu_console_get_label(),
right?

thanks
-- PMM



reply via email to

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