mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Correct alert panel handling.
This commit is contained in:
parent
0d5bd775cb
commit
e15b963279
2 changed files with 12 additions and 6 deletions
|
@ -241,6 +241,7 @@ t in:(id) obj
|
||||||
int row;
|
int row;
|
||||||
char fname[1024];
|
char fname[1024];
|
||||||
id panel;
|
id panel;
|
||||||
|
NSModalSession session;
|
||||||
|
|
||||||
matrix =[sender matrixInColumn:0];
|
matrix =[sender matrixInColumn:0];
|
||||||
row =[matrix selectedRow];
|
row =[matrix selectedRow];
|
||||||
|
@ -248,12 +249,15 @@ t in:(id) obj
|
||||||
|
|
||||||
panel = NSGetAlertPanel (@"Loading...",
|
panel = NSGetAlertPanel (@"Loading...",
|
||||||
@"Loading map. Please wait.", NULL, NULL, NULL);
|
@"Loading map. Please wait.", NULL, NULL, NULL);
|
||||||
[panel orderFront:NULL];
|
|
||||||
|
session = [NSApp beginModalSessionForWindow: panel];
|
||||||
|
[NSApp runModalSession: session];
|
||||||
|
|
||||||
[quakeed_i doOpen:fname];
|
[quakeed_i doOpen:fname];
|
||||||
|
|
||||||
[panel performClose:NULL];
|
[NSApp endModalSession: session];
|
||||||
// NSFreeAlertPanel(panel);
|
[panel close];
|
||||||
|
NSReleaseAlertPanel (panel);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -676,12 +676,14 @@ cmdline dialog:(BOOL) wt
|
||||||
|
|
||||||
if (wt) {
|
if (wt) {
|
||||||
id panel;
|
id panel;
|
||||||
|
NSModalSession session;
|
||||||
|
|
||||||
panel = NSGetAlertPanel (@"BSP In Progress",[NSString stringWithCString:expandedcmd], NULL, NULL, NULL);
|
panel = NSGetAlertPanel (@"BSP In Progress",[NSString stringWithCString:expandedcmd], NULL, NULL, NULL);
|
||||||
[panel makeKeyAndOrderFront:NULL];
|
session = [NSApp beginModalSessionForWindow: panel];
|
||||||
system (expandedcmd);
|
system (expandedcmd);
|
||||||
[panel release];
|
[NSApp endModalSession: session];
|
||||||
[self makeKeyAndOrderFront:NULL];
|
[panel close];
|
||||||
|
NSReleaseAlertPanel (panel);
|
||||||
DisplayCmdOutput ();
|
DisplayCmdOutput ();
|
||||||
} else {
|
} else {
|
||||||
// cmdte = DPSAddTimedEntry(1, CheckCmdDone, self, NS_BASETHRESHOLD);
|
// cmdte = DPSAddTimedEntry(1, CheckCmdDone, self, NS_BASETHRESHOLD);
|
||||||
|
|
Loading…
Reference in a new issue