mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 06:50:41 +00:00
Revert last doc close and fix releaseWhenClosed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17691 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6313ec68cc
commit
f79d2b9d9b
4 changed files with 24 additions and 22 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2003-09-20 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSWindowController.m ([NSWindowController -setDocument:]):
|
||||||
|
Set window to releaseWhenClosed if document is not nil.
|
||||||
|
* Source/NSApplication.m ([NSApplication -targetForAction:]): Revert
|
||||||
|
last change.
|
||||||
|
* Source/NSWindow.m ([NSWindow -performClose:]): Idem.
|
||||||
|
|
||||||
2003-09-19 Matt Rice <ratmice@yahoo.com>
|
2003-09-19 Matt Rice <ratmice@yahoo.com>
|
||||||
|
|
||||||
* Source/NSApplication.m ([NSApplication -targetForAction:]): Check
|
* Source/NSApplication.m ([NSApplication -targetForAction:]): Check
|
||||||
|
|
|
@ -1649,6 +1649,16 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
}
|
}
|
||||||
resp = [resp nextResponder];
|
resp = [resp nextResponder];
|
||||||
}
|
}
|
||||||
|
if ([keyWindow respondsToSelector: aSelector])
|
||||||
|
{
|
||||||
|
return keyWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
resp = [keyWindow delegate];
|
||||||
|
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||||
|
{
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
if ([NSDocumentController isDocumentBasedApplication])
|
if ([NSDocumentController isDocumentBasedApplication])
|
||||||
{
|
{
|
||||||
|
@ -1660,17 +1670,6 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([keyWindow respondsToSelector: aSelector])
|
|
||||||
{
|
|
||||||
return keyWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
resp = [keyWindow delegate];
|
|
||||||
if (resp != nil && [resp respondsToSelector: aSelector])
|
|
||||||
{
|
|
||||||
return resp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_session != 0)
|
if (_session != 0)
|
||||||
|
|
|
@ -2304,8 +2304,6 @@ resetCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
- (void) performClose: (id)sender
|
- (void) performClose: (id)sender
|
||||||
{
|
{
|
||||||
NSDocument *document = [_windowController document];
|
|
||||||
|
|
||||||
/* Don't close if a modal session is running and we are not the
|
/* Don't close if a modal session is running and we are not the
|
||||||
modal window */
|
modal window */
|
||||||
if ([NSApp modalWindow] && self != [NSApp modalWindow])
|
if ([NSApp modalWindow] && self != [NSApp modalWindow])
|
||||||
|
@ -2320,6 +2318,8 @@ resetCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
if (_windowController)
|
if (_windowController)
|
||||||
{
|
{
|
||||||
|
NSDocument *document = [_windowController document];
|
||||||
|
|
||||||
if (document && ![document shouldCloseWindowController: _windowController])
|
if (document && ![document shouldCloseWindowController: _windowController])
|
||||||
{
|
{
|
||||||
NSBeep();
|
NSBeep();
|
||||||
|
@ -2355,14 +2355,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: The button should be highlighted
|
// FIXME: The button should be highlighted
|
||||||
if (document)
|
|
||||||
{
|
|
||||||
[document close];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self close];
|
[self close];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||||
|
|
|
@ -160,6 +160,8 @@
|
||||||
released. */
|
released. */
|
||||||
[_window setReleasedWhenClosed: NO];
|
[_window setReleasedWhenClosed: NO];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
[_window setReleasedWhenClosed: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) document
|
- (id) document
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue