fix to get open panels working again.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-10-11 16:29:03 +00:00
parent be1045089a
commit 23c6ece351
2 changed files with 19 additions and 11 deletions

View file

@ -1,3 +1,10 @@
2009-10-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSApplication.m: ([stopModalWithCode:]) correct the check to
see if a modal session is running. This fixes the breakage caused by
the recent change sending -stopModal to invisible windows (like open
panels ordered out at the end of their modal loop).
2009-10-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSStandardWindowDecorationView.m (-dealloc): Remove from

View file

@ -1872,19 +1872,20 @@ See -runModalForWindow:
*/
- (void) stopModalWithCode: (int)returnCode
{
if (_session == 0)
/* According to the spec, there is no exception which is thrown
* if we are not currently in a modal session. While it is not
* good practice to call this when we're not, we shouldn't throw
* an exception.
*/
if (_session != 0 && _session->runState == NSRunContinuesResponse)
{
// According to the spec, there is no exception which is thrown if we are not
// currently in a modal session. While it is not good practice to call this
// when we're not, we shouldn't throw an exception.
return;
if (returnCode == NSRunContinuesResponse)
{
[NSException raise: NSInvalidArgumentException
format: @"stopModalWithCode: with NSRunContinuesResponse"];
}
_session->runState = returnCode;
}
else if (returnCode == NSRunContinuesResponse)
{
[NSException raise: NSInvalidArgumentException
format: @"stopModalWithCode: with NSRunContinuesResponse"];
}
_session->runState = returnCode;
}
/**