diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-07 20:35:06 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-07 20:35:06 +0000 |
commit | 5a246934eb737c242e28995641c9ebf80477b0b7 (patch) | |
tree | 2f1612d92080b985024cf68b0633cab1aefb5eec /cocoa.m | |
parent | b7e2c11dbd16257ec511b4aaa9c765eeda926563 (diff) | |
download | qemu-5a246934eb737c242e28995641c9ebf80477b0b7.tar.gz qemu-5a246934eb737c242e28995641c9ebf80477b0b7.tar.bz2 qemu-5a246934eb737c242e28995641c9ebf80477b0b7.zip |
open the dialog box if an image was not selected from command-line (Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1358 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cocoa.m')
-rw-r--r-- | cocoa.m | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -416,8 +416,11 @@ static void QZ_SetPortAlphaOpaque () /* Called when the internal event loop has just started running */ - (void)applicationDidFinishLaunching: (NSNotification *) note { - - /* Do whatever we want here : set up a pc list... */ + + /* Display an open dialog box if no argument were passed or + if qemu was launched from the finder ( the Finder passes "-psn" ) */ + + if( gArgc <= 1 || strncmp (gArgv[1], "-psn", 4) == 0) { NSOpenPanel *op = [[NSOpenPanel alloc] init]; @@ -431,9 +434,11 @@ static void QZ_SetPortAlphaOpaque () modalForWindow:window modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } - - /* or Launch Qemu, with the global args */ - //[self startEmulationWithArgc:gArgc argv:gArgv]; + else + { + /* or Launch Qemu, with the global args */ + [self startEmulationWithArgc:gArgc argv:gArgv]; + } } - (void)applicationWillTerminate:(NSNotification *)aNotification |