mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-15 11:51:21 +00:00
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
This commit is contained in:
parent
b7e2c11dbd
commit
5a246934eb
13
cocoa.m
13
cocoa.m
@ -417,7 +417,10 @@ static void QZ_SetPortAlphaOpaque ()
|
|||||||
- (void)applicationDidFinishLaunching: (NSNotification *) note
|
- (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];
|
NSOpenPanel *op = [[NSOpenPanel alloc] init];
|
||||||
|
|
||||||
@ -431,9 +434,11 @@ static void QZ_SetPortAlphaOpaque ()
|
|||||||
modalForWindow:window modalDelegate:self
|
modalForWindow:window modalDelegate:self
|
||||||
didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/* or Launch Qemu, with the global args */
|
{
|
||||||
//[self startEmulationWithArgc:gArgc argv:gArgv];
|
/* or Launch Qemu, with the global args */
|
||||||
|
[self startEmulationWithArgc:gArgc argv:gArgv];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
||||||
|
Loading…
Reference in New Issue
Block a user