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: Programmingkid
Subject: Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: remove open dialog code
Date: Fri, 25 Sep 2015 12:12:24 -0400

On Sep 25, 2015, at 12:09 PM, Peter Maydell wrote:

> 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?
I will change it back to checking for -psn.

> (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?)

I suppose you are right. Will make a new patch to fix this problem.




reply via email to

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