mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 17:31:28 +00:00
Correct alert panel handling.
This commit is contained in:
parent
f049f9815c
commit
5f99251577
2 changed files with 12 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue