mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSDocument.m ([NSDocument -init]): Check the count of the
types array and uses Viewer and Editor NSRoles to set the default type. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17485 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a5621a25e4
commit
a3113ee753
3 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-08-16 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/NSDocument.m ([NSDocument -init]): Check the count of the
|
||||
types array and uses Viewer and Editor NSRoles to set the default
|
||||
type.
|
||||
|
||||
2003-08-13 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/gnustep/gui/*.h/*.h.in: Remove headers moved in header
|
||||
|
|
|
@ -1761,7 +1761,6 @@ static NSTextFieldCell *titleCell;
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Setting the delegate
|
||||
*/
|
||||
|
|
|
@ -63,15 +63,20 @@
|
|||
- (id) init
|
||||
{
|
||||
static int untitledCount = 1;
|
||||
NSArray *fileTypes;
|
||||
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_documentIndex = untitledCount++;
|
||||
_windowControllers = [[NSMutableArray alloc] init];
|
||||
fileTypes = [[self class] readableTypes];
|
||||
|
||||
/* Set our default type */
|
||||
[self setFileType: [[[self class] writableTypes] objectAtIndex: 0]];
|
||||
if ([fileTypes count])
|
||||
{
|
||||
[self setFileType: [fileTypes objectAtIndex: 0]];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue