git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@5655 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-01-04 12:37:00 +00:00
parent d5b56eea8e
commit 042bb78eb2
5 changed files with 20 additions and 5 deletions

View file

@ -1,3 +1,4 @@
{
OpenNibs = NO;
SaveAsNib = NO;
}

View file

@ -260,8 +260,13 @@ The current defaults are -
If this boolean is set to @samp{YES} then Gorm will save documents with a
@samp{.nib} file extension (for NeXT/Apple compatibility), otherwise it will
save with a @samp{.gorm} extension. In either case, Gorm will permit attempts
to open either type of document.
save with a @samp{.gorm} extension.
@item OpenNibs
If this boolean is set to @samp{YES} then Gorm will accept an attempt to open
a document with a @samp{.nib} file extension (for NeXT/Apple compatibility),
otherwise it will only open documents with a @samp{.gorm} extension.
NB. While Gorm will attempt to open @samp{.nib} documents, it can't open true
NeXT/Apple documents, only ones it has written itsself.

View file

@ -29,7 +29,8 @@ include $(GNUSTEP_MAKEFILES)/common.make
#
SUBPROJECTS = \
Documentation \
Palettes
Palettes \
Testing
#
# MAIN APP

View file

@ -808,10 +808,18 @@ static NSImage *classesImage = nil;
*/
- (id) openDocument: (id)sender
{
NSArray *fileTypes = [NSArray arrayWithObjects: @"gorm", @"nib", nil];
NSArray *fileTypes;
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
int result;
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"OpenNibs"] == YES)
{
fileTypes = [NSArray arrayWithObjects: @"gorm", @"nib", nil];
}
else
{
fileTypes = [NSArray arrayWithObjects: @"gorm", nil];
}
[oPanel setAllowsMultipleSelection: NO];
[oPanel setCanChooseFiles: YES];
[oPanel setCanChooseDirectories: NO];

View file

@ -35,7 +35,7 @@
- (id) open: (id)sender
{
NSArray *fileTypes = [NSArray arrayWithObject: @"nib"];
NSArray *fileTypes = [NSArray arrayWithObjects: @"gorm", @"nib", nil];
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
id oldDelegate = [NSApp delegate];
int result;