Set the type of a newly created untitled document.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22803 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2006-04-23 22:17:19 +00:00
parent a2022095b4
commit 93315b5129
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-04-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDocumentController.m (-makeUntitledDocumentOfType:):
Set the type of the new document. Patch by Saso Kiselkov
<diablos@manga.sk>.
2006-04-19 Adam Fedor <fedor@gnu.org>
* configure: Add arg to disable aspell (for use on Mac OS X).

View file

@ -199,7 +199,11 @@ static NSDictionary *TypeInfoForName (NSArray *types, NSString *typeName)
- (id) makeUntitledDocumentOfType: (NSString *)type
{
Class documentClass = [self documentClassForType: type];
return AUTORELEASE ([[documentClass alloc] init]);
id document = AUTORELEASE ([[documentClass alloc] init]);
[document setFileType: type];
return document;
}
- (id) makeDocumentWithContentsOfFile: (NSString *)fileName