mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Center modal window
This commit is contained in:
parent
41460c80c5
commit
1e565994cd
1 changed files with 2 additions and 6 deletions
|
@ -112,7 +112,6 @@
|
|||
}
|
||||
else if ([_kind isEqualToString: @"modal"])
|
||||
{
|
||||
NSInteger code = NSRunContinuesResponse;
|
||||
NSWindow *w = nil;
|
||||
if ([_destinationController isKindOfClass: [NSWindowController class]])
|
||||
{
|
||||
|
@ -123,11 +122,8 @@
|
|||
w = [NSWindow windowWithContentViewController: _destinationController];
|
||||
}
|
||||
RETAIN(w);
|
||||
code = [NSApp runModalForWindow: w];
|
||||
if (code != NSRunContinuesResponse)
|
||||
{
|
||||
NSLog(@"Modal returned error response.");
|
||||
}
|
||||
[w center];
|
||||
[NSApp runModalForWindow: w];
|
||||
RELEASE(w);
|
||||
}
|
||||
else if ([_kind isEqualToString: @"show"])
|
||||
|
|
Loading…
Reference in a new issue