Change NSDocument's -windowForSheet implementation to match the actual

OS X implementation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27620 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-01-17 16:08:30 +00:00
parent 2800af404c
commit 12ffaa698c
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2009-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocument.m (-windowForSheet): Return nil if the
document has no window controllers.
2009-01-16 12:04-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSMenuItem.m: Retain the GSMenuSeparator instance if

View file

@ -353,7 +353,13 @@ withContentsOfURL: (NSURL *)url
return win;
}
return [NSApp mainWindow];
/* Note: While Apple's documentation says that this method returns
* [NSApp mainWindow] if the document has no window controllers, the
* actual implementation returns nil and, in fact, the header files
* on OS X also say so. Since it would be very unreasonable to attach a
* document modal sheet to a window that doesn't belong to this document,
* we do the same here, too. */
return nil;
}
/**