qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: remove open dialog code


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: remove open dialog code
Date: Fri, 25 Sep 2015 09:09:00 -0700

On 23 September 2015 at 16:06, Programmingkid <address@hidden> wrote:
> Removes the open dialog code that runs when no arguments
> are supplied with QEMU. Not everyone needs a hard drive
> or cdrom to boot their target. A user might only need to
> use their target's bios to do work. With that said,
> this patch removes the unneeded open dialog code.
>
> Signed-off-by: John Arbuckle <address@hidden>
>
> ---
> Add a dialog box that tells the user to start QEMU from
> the commandline instead of the Finder.
>
>  ui/cocoa.m |   66
> ++++++++++++-----------------------------------------------
>  1 files changed, 14 insertions(+), 52 deletions(-)
>
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 334e6f6..dc8e0f6 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -814,7 +814,6 @@ QemuCocoaView *cocoaView;
>  {
>  }
>  - (void)startEmulationWithArgc:(int)argc argv:(char**)argv;
> -- (void)openPanelDidEnd:(NSOpenPanel *)sheet
> returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
>  - (void)doToggleFullScreen:(id)sender;
>  - (void)toggleFullScreen:(id)sender;
>  - (void)showQEMUDoc:(id)sender;
> @@ -896,27 +895,20 @@ QemuCocoaView *cocoaView;
>  {
>      COCOA_DEBUG("QemuCocoaAppController: applicationDidFinishLaunching\n");
>
>
>
> -    // Display an open dialog box if no arguments were passed or
> -    // if qemu was launched from the finder ( the Finder passes "-psn" )
> -    if( gArgc <= 1 || strncmp ((char *)gArgv[1], "-psn", 4) == 0) {

Here we look at whether we were passed "-psn" as our check for
whether we were launched from the Finder...

> +    // if the user launched QEMU from the Finder
> +    if(gArgc == 1) {

...but here you have changed the condition. Why?
(Also, isn't a simple test on gArgc going to cause us to put up
the dialog box even if qemu was started from the command line with
no arguments?)

thanks
-- PMM



reply via email to

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