Index: cocoa.m =================================================================== RCS file: /cvsroot/qemu/qemu/cocoa.m,v retrieving revision 1.2 diff -u -r1.2 cocoa.m --- cocoa.m 2 Mar 2005 22:22:43 -0000 1.2 +++ cocoa.m 3 Mar 2005 12:51:44 -0000 @@ -416,8 +416,11 @@ /* 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 @@ 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