qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/3] cocoa: Close sheet after image file selection


From: Andreas Färber
Subject: [Qemu-devel] [PATCH 3/3] cocoa: Close sheet after image file selection
Date: Tue, 1 Nov 2011 20:56:29 +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 <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
 ui/cocoa.m |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index d9e4e3d..0711205 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -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);
-- 
1.7.0.3




reply via email to

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