mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Remove old method, correct oid issue, correct image issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
92933fd3a5
commit
c7ce49dca4
4 changed files with 18 additions and 36 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-08-13 21:48-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormNibWrapperBuilder.m: Correct issue which was
|
||||
causing IB to complain about the File's Owner not having
|
||||
an oid in [NSIBObjectData initWithDocument:].
|
||||
* GormCore/GormWrapperBuilder.m: Correct issue discovered by
|
||||
Benhur Stein that was causing images not to be saved in the
|
||||
wrapper correctly in buildFileWrapperDictionaryWithDocument:
|
||||
* Gorm.m: Remove uneeded application:openFile: method which was
|
||||
commented out.
|
||||
|
||||
2006-08-11 11:13-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormDocumentController.m: Default backing store changed
|
||||
|
|
25
Gorm.m
25
Gorm.m
|
@ -950,31 +950,6 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
/*
|
||||
- (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName
|
||||
{
|
||||
NSString *ext = [fileName pathExtension];
|
||||
GormDocument *doc = nil;
|
||||
|
||||
if([[GormDocument readableTypes] containsObject: ext])
|
||||
{
|
||||
doc = AUTORELEASE([[GormDocument alloc] init]);
|
||||
if ([doc loadDocument: fileName] == nil)
|
||||
{
|
||||
doc = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
[documents addObject: doc];
|
||||
[[doc window] orderFrontRegardless];
|
||||
[[doc window] makeKeyWindow];
|
||||
}
|
||||
}
|
||||
|
||||
return (doc != nil);
|
||||
}
|
||||
*/
|
||||
|
||||
- (GormPalettesManager*) palettesManager
|
||||
{
|
||||
if (palettesManager == nil)
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
NSEnumerator *en = [cons objectEnumerator];
|
||||
id o = nil;
|
||||
id owner = [document objectForName: @"NSOwner"];
|
||||
int oid = 1;
|
||||
unsigned int oid = 1;
|
||||
|
||||
// Create the container for the .nib file...
|
||||
ASSIGN(_root, owner);
|
||||
NSMapInsert(_names, owner, @"File's Owner");
|
||||
NSMapInsert(_oids, owner, @"0");
|
||||
NSMapInsert(_oids, owner, [[NSNumber alloc] initWithUnsignedInt: oid++]);
|
||||
ASSIGN(_framework, @"IBCocoaFramework");
|
||||
[_topLevelObjects addObjectsFromArray: [[document topLevelObjects] allObjects]];
|
||||
[_visibleWindows addObjectsFromArray: [[document visibleWindows] allObjects]];
|
||||
|
@ -64,6 +64,8 @@
|
|||
// fill in objects and connections....
|
||||
while((o = [en nextObject]) != nil)
|
||||
{
|
||||
NSNumber *currOid = [[NSNumber alloc] initWithUnsignedInt: oid++];
|
||||
|
||||
if([o isMemberOfClass: [NSNibConnector class]])
|
||||
{
|
||||
id src = [o source];
|
||||
|
@ -96,17 +98,13 @@
|
|||
|
||||
NSMapInsert(_objects, src, dst);
|
||||
NSMapInsert(_names, src, name);
|
||||
NSMapInsert(_oids, src, [NSString stringWithFormat: @"%d", oid]);
|
||||
NSMapInsert(_oids, src, currOid);
|
||||
}
|
||||
else
|
||||
{
|
||||
[_connections addObject: o];
|
||||
NSMapInsert(_oids, o, [NSString stringWithFormat: @"%d", oid]);
|
||||
// NSMapInsert(_objects, o, owner);
|
||||
NSMapInsert(_oids, o, currOid);
|
||||
}
|
||||
|
||||
// next...
|
||||
oid++;
|
||||
}
|
||||
|
||||
// set the next oid...
|
||||
|
|
|
@ -89,18 +89,16 @@ static GormWrapperBuilderFactory *_sharedWrapperBuilderFactory = nil;
|
|||
if([object isSystemResource] == NO)
|
||||
{
|
||||
NSString *path = [object path];
|
||||
NSString *resName = nil;
|
||||
NSString *resName = [path lastPathComponent];
|
||||
NSData *resData = nil;
|
||||
NSFileWrapper *fileWrapper = nil;
|
||||
|
||||
if([object isInWrapper])
|
||||
{
|
||||
resName = [object filename];
|
||||
resData = [object data];
|
||||
}
|
||||
else
|
||||
{
|
||||
resName = [path lastPathComponent];
|
||||
resData = [NSData dataWithContentsOfFile: path];
|
||||
[object setData: resData];
|
||||
[object setInWrapper: YES];
|
||||
|
|
Loading…
Reference in a new issue