Make ShowProgressUI return when QuitProgressUI is called instead of terminating

the updater process.
This commit is contained in:
darin%meer.net 2005-06-22 01:06:41 +00:00
Родитель f4e745ab8e
Коммит 9b0cd07584
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -88,7 +88,10 @@ static const char *sProgramPath;
if (sQuit) {
[aTimer invalidate];
[aTimer release];
[[NSApplication sharedApplication] terminate:self];
// It seems to be necessary to hide ourselves before we stop, otherwise the
// "run" method will not return until the user focuses some other app.
[NSApp hide:self];
[NSApp stop:self];
}
float progress = sProgressVal;
@ -124,7 +127,9 @@ ShowProgressUI()
if (sQuit || sProgressVal > 50.0f)
return 0;
NSApplicationMain(1, &sProgramPath);
[NSApplication sharedApplication];
[NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
[NSApp run];
return 0;
}