More of the same conversion.
This commit is contained in:
parent
bc50405364
commit
580b06638f
|
@ -92,9 +92,11 @@ extern NSRect dummyRect;
|
||||||
return NSTerminateNow;
|
return NSTerminateNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)chan
|
- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)data
|
||||||
{
|
{
|
||||||
dialog_send(chan, (uintptr_t) returnCode);
|
NSInteger *ret = (NSInteger *) data;
|
||||||
|
|
||||||
|
*ret = returnCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -23,13 +23,14 @@ static void alert(id parent, NSString *primary, NSString *secondary, NSAlertStyl
|
||||||
if (parent == nil)
|
if (parent == nil)
|
||||||
return (intptr_t) [box runModal];
|
return (intptr_t) [box runModal];
|
||||||
else {
|
else {
|
||||||
NSInteger *ret;
|
NSInteger ret;
|
||||||
|
|
||||||
[box beginSheetModalForWindow:toNSWindow(parent)
|
[box beginSheetModalForWindow:toNSWindow(parent)
|
||||||
modalDelegate:[NSApp delegate]
|
modalDelegate:[NSApp delegate]
|
||||||
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
|
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
|
||||||
contextInfo:&ret];
|
contextInfo:&ret];
|
||||||
// TODO
|
// TODO
|
||||||
|
return (intptr_t) ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue