Skip to content

Commit

Permalink
cocoa: Close sheet after image file selection
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
  • Loading branch information
afaerber committed Nov 1, 2011
1 parent db529aa commit 13766eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ - (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextI

char **argv = (char**)malloc( sizeof(char*)*3 );

[sheet close];

asprintf(&argv[0], "%s", bin);
asprintf(&argv[1], "-hda");
asprintf(&argv[2], "%s", img);
Expand Down

0 comments on commit 13766eb

Please sign in to comment.