Allow newDocument: on NSDocumentController only when there is a default

type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27667 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2009-01-24 13:11:25 +00:00
parent d755437127
commit c6b4d75935
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2009-01-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDocumentController.m (-validateUserInterfaceItem:):
Show newDocument: only if there is a default type.
2009-01-23 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSWindow.m: ignore invalid rects when checking

View file

@ -1121,6 +1121,10 @@ static BOOL _shouldClose = YES;
{
return [self hasEditedDocuments];
}
if (sel_eq([anItem action], @selector(newDocument:)))
{
return ([self defaultType] != nil);
}
return YES;
}