Correct alert panel handling.

This commit is contained in:
Bill Currie 2010-09-19 17:05:34 +09:00
parent 0d5bd775cb
commit e15b963279
2 changed files with 12 additions and 6 deletions

View File

@ -241,6 +241,7 @@ t in:(id) obj
int row;
char fname[1024];
id panel;
NSModalSession session;
matrix =[sender matrixInColumn:0];
row =[matrix selectedRow];
@ -248,12 +249,15 @@ t in:(id) obj
panel = NSGetAlertPanel (@"Loading...",
@"Loading map. Please wait.", NULL, NULL, NULL);
[panel orderFront:NULL];
session = [NSApp beginModalSessionForWindow: panel];
[NSApp runModalSession: session];
[quakeed_i doOpen:fname];
[panel performClose:NULL];
// NSFreeAlertPanel(panel);
[NSApp endModalSession: session];
[panel close];
NSReleaseAlertPanel (panel);
return self;
}

View File

@ -676,12 +676,14 @@ cmdline dialog:(BOOL) wt
if (wt) {
id panel;
NSModalSession session;
panel = NSGetAlertPanel (@"BSP In Progress",[NSString stringWithCString:expandedcmd], NULL, NULL, NULL);
[panel makeKeyAndOrderFront:NULL];
session = [NSApp beginModalSessionForWindow: panel];
system (expandedcmd);
[panel release];
[self makeKeyAndOrderFront:NULL];
[NSApp endModalSession: session];
[panel close];
NSReleaseAlertPanel (panel);
DisplayCmdOutput ();
} else {
// cmdte = DPSAddTimedEntry(1, CheckCmdDone, self, NS_BASETHRESHOLD);