2006-06-20 20:58 Gregory John Casamento <greg_casamento@yahoo.com>

* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Added
	declarations for classes and names methods and change return
	type for objects method.
	* Source/GSNibCompatibility.m: Properly return the pointer in
	objects method and also add methods for names, and classes
	maps in the nib file.
	* Source/NSDocument.m: Refuse to write a file for a type which isn't
	native.  If the class method isNativeType: returns YES, then write the
	file in writeToFile:ofType:saveOperation:.
	* Source/NSSliderCell.m: Make the cell non-bordered in initWithCoder:



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23095 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2006-06-21 01:02:25 +00:00
parent 27d8140c40
commit b4ed61fce1
5 changed files with 32 additions and 5 deletions

View file

@ -1,3 +1,16 @@
2006-06-20 20:58 Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Added
declarations for classes and names methods and change return
type for objects method.
* Source/GSNibCompatibility.m: Properly return the pointer in
objects method and also add methods for names, and classes
maps in the nib file.
* Source/NSDocument.m: Refuse to write a file for a type which isn't
native. If the class method isNativeType: returns YES, then write the
file in writeToFile:ofType:saveOperation:.
* Source/NSSliderCell.m: Make the cell non-bordered in initWithCoder:
2006-06-18 14:38 Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Added

View file

@ -240,7 +240,9 @@ typedef struct _GSWindowTemplateFlags
- (void) nibInstantiateWithOwner: (id)owner topLevelObjects: (NSMutableArray *)toplevel;
- (id) objectForName: (NSString *)name;
- (NSString *) nameForObject: (id)name;
- (NSMapTable) objects;
- (NSMapTable *) objects;
- (NSMapTable *) names;
- (NSMapTable *) classes;
- (NSArray *) visibleWindows;
@end

View file

@ -1014,11 +1014,21 @@ static BOOL _isInInterfaceBuilder = NO;
return [_visibleWindows allObjects];
}
- (NSMapTable) objects
- (NSMapTable *) objects
{
return _objects;
}
- (NSMapTable *) names
{
return _names;
}
- (NSMapTable *) classes
{
return _classes;
}
- (id) objectForName: (NSString *)name
{
NSArray *nameKeys = (NSArray *)NSAllMapTableKeys(_names);

View file

@ -731,8 +731,9 @@
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *backupFilename = nil;
BOOL isNativeType = [[self class] isNativeType: fileType];
if (fileName)
if (fileName && isNativeType)
{
NSArray *extensions = [[NSDocumentController sharedDocumentController]
fileExtensionsFromType: fileType];

View file

@ -580,9 +580,10 @@ DEFINE_RINT_IF_MISSING
[_titleCell setStringValue: @""];
[_titleCell setAlignment: NSCenterTextAlignment];
// if it's from a nib, make it bordered and bezeled so it's more attractive.
// if it's from a nib, make it bordered and bezeled so it's more attractive, this
// information is not in the nib.
[self setBordered: YES];
[self setBezeled: YES];
[self setBezeled: NO];
_isVertical = -1;
}