2
0
Эх сурвалжийг харах

cocoa: Close sheet after image file selection

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>
Andreas Färber 14 жил өмнө
parent
commit
13766eb1e4
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      ui/cocoa.m

+ 2 - 0
ui/cocoa.m

@@ -811,6 +811,8 @@ - (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextI
 
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
         char **argv = (char**)malloc( sizeof(char*)*3 );
 
 
+        [sheet close];
+
         asprintf(&argv[0], "%s", bin);
         asprintf(&argv[0], "%s", bin);
         asprintf(&argv[1], "-hda");
         asprintf(&argv[1], "-hda");
         asprintf(&argv[2], "%s", img);
         asprintf(&argv[2], "%s", img);