Fix bug #27613. After closing the print option panel via the close

button the application was no longer reacting.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-10-10 13:56:45 +00:00
parent 2be2de6735
commit 18efe486cc
3 changed files with 31 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2009-10-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-endModalSession:): Bring the window of
the next modal session to the front.
* Source/NSApplication.m (-runModalSession:): Better check whether
the current session window is gone.
* Source/NSPrintPanel.m (-_pickedButton:): Remove bogus log statement.
2009-09-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSImage.m: ([-setName:]) fix bug which was removing the

View file

@ -1635,6 +1635,27 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
[theSession->window setLevel: theSession->entryLevel];
}
NSZoneFree(NSDefaultMallocZone(), theSession);
// Bring the next modal window to front
if ((_session != 0) &&
([windows indexOfObjectIdenticalTo: _session->window] != NSNotFound))
{
NSWindow *theWindow = _session->window;
// Same code as in beginModalSessionForWindow:
[theWindow orderFrontRegardless];
if ([self isActive] == YES)
{
if ([theWindow canBecomeKeyWindow] == YES)
{
[theWindow makeKeyWindow];
}
else if ([theWindow canBecomeMainWindow] == YES)
{
[theWindow makeMainWindow];
}
}
}
}
/**
@ -1786,8 +1807,8 @@ See Also: -runModalForWindow:
/*
* Check to see if the window has gone away - if so, end session.
*/
if ([[self windows] indexOfObjectIdenticalTo: _session->window] ==
NSNotFound)
if ([[self windows] indexOfObjectIdenticalTo: _session->window] == NSNotFound
|| ![_session->window isVisible])
{
[self stopModal];
}

View file

@ -297,7 +297,6 @@ static NSPrintPanel *shared_instance;
else if (tag == NSPPOptionsButton)
{
/* Open the options panel */
NSLog(@"Running _optionPanel modal");
[NSApp runModalForWindow: _optionPanel];
[_optionPanel orderOut: self];
return;