Corrected issue #6467.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18374 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-01-11 18:03:45 +00:00
parent 79fad1e58a
commit 3414504517
5 changed files with 50 additions and 15 deletions

View file

@ -1,3 +1,13 @@
2004-01-11 13:08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: Removed awakeFromDocument code and moved it to
Gorm.m so that awakeFromDocument is called after all initialization is
done.
* Gorm.m: Added loop in open: to awake all objects in the nametable
after loading.
* Palettes/0Menus/GSMenuInspectors.m: Added code to close all of
the uneeded menus upon loading. This corrects Report #6467.
2004-01-06 01:12 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: [GormDocument attachObject:] added logic

19
Gorm.m
View file

@ -529,9 +529,9 @@ NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectF
forKey: @"ApplicationName"];
[dict setObject: @"[GNUstep | Graphical] Object Relationship Modeller"
forKey: @"ApplicationDescription"];
[dict setObject: @"Gorm 0.5.2 (Beta)"
[dict setObject: @"Gorm 0.5.4 (Beta)"
forKey: @"ApplicationRelease"];
[dict setObject: @"0.5.2 Dec 13 2003"
[dict setObject: @"0.5.4 Jan 06 2004"
forKey: @"FullVersionID"];
[dict setObject: [NSArray arrayWithObjects: @"Gregory John Casamento <greg_casamento@yahoo.com>",
@"Richard Frith-Macdonald <rfm@gnu.org>",
@ -574,7 +574,22 @@ NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectF
}
else
{
NSDictionary *nameTable = [(id<IBDocuments>)doc nameTable];
NSEnumerator *enumerator = [nameTable keyEnumerator];
NSString *key = nil;
// order everything front.
[[doc window] makeKeyAndOrderFront: self];
// the load is completed, awaken all of the elements.
while ((key = [enumerator nextObject]) != nil)
{
id o = [nameTable objectForKey: key];
if ([o respondsToSelector: @selector(awakeFromDocument:)])
{
[o awakeFromDocument: doc];
}
}
}
}

View file

@ -44,18 +44,6 @@
}
@end
/*
@implementation NSMenuItem (IBObjectAdditions)
- (void)awakeFromDocument: (id <IBDocuments>)doc
{
NSLog(@"In here");
// [self setState: NSOnState];
// [self setState: NSOffState];
}
@end
*/
@interface NSNibControlConnector (GormExtension)
- (BOOL) isEqual: (id)object;
@end
@ -2131,6 +2119,7 @@ static NSImage *classesImage = nil;
NSDebugLog(@"nameTable = %@",[c nameTable]);
/*
enumerator = [[c nameTable] keyEnumerator];
while ((key = [enumerator nextObject]) != nil)
{
@ -2140,6 +2129,7 @@ static NSImage *classesImage = nil;
[o awakeFromDocument: self];
}
}
*/
// this is the last thing we should do...
[nc postNotificationName: IBDidOpenDocumentNotification

View file

@ -423,7 +423,12 @@
[[[edited menuRepresentation] window] setFrameTopLeftPoint: tl];
}
[edited display];
// display the main menu only.
if([edited supermenu] == nil)
{
[edited display];
}
return NO;
}
return YES;

View file

@ -133,6 +133,21 @@
{
return @"GormMenuItemAttributesInspector";
}
- (void)awakeFromDocument: (id <IBDocuments>)doc
{
NSMenu *menu = [self menu];
if(menu != nil)
{
if([menu supermenu] != nil)
{
// NSLog(@"Menu = %@",menu);
// [menu display];
[menu close];
[menu closeTransient];
}
}
}
@end
@interface GormMenuItemAttributesInspector : IBInspector