]> git.proxmox.com Git - qemu.git/commitdiff
cocoa: Close sheet after image file selection
authorAndreas Färber <andreas.faerber@web.de>
Sun, 30 Oct 2011 22:19:54 +0000 (23:19 +0100)
committerAndreas Färber <andreas.faerber@web.de>
Tue, 1 Nov 2011 19:41:06 +0000 (20:41 +0100)
If no disk image is specified, the Cocoa frontend displays a modal sheet
to let the user select an image file to boot from.

This sheet is never closed and it permanently obscures the emulator window.

Close it after obtaining the file name in case the user did select a file.
Otherwise we exit immediately, so no need to close then.

Signed-off-by: Juan Pineda <juan@logician.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
ui/cocoa.m

index d9e4e3dcaa45ba40b10f35d3486c570ac80c47f0..0711205cbe199114dc13c43d5d5ba0e26aeac9d3 100644 (file)
@@ -811,6 +811,8 @@ QemuCocoaView *cocoaView;
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
 
+        [sheet close];
+
         asprintf(&argv[0], "%s", bin);
         asprintf(&argv[1], "-hda");
         asprintf(&argv[2], "%s", img);