Some additional fixes for menu editing.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19230 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-05-02 11:39:58 +00:00
parent 172424d5a8
commit 9358afe12b
3 changed files with 29 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2004-05-01 17:40 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: [GormDocument openEditorForObject:]
Do not bring the editor to the front if it's for an NSMenu.
This prevents the "flash" bug which was apparent after the most
recent fix for menu editing in Gorm.
* GormNSMenu.m: Added #ifdef in GormNSMenu to conditionally compile
[GormNSMenu display] so that it becomes easier to debug issues
with NSMenu editing.
2004-05-01 17:40 Gregory John Casamento <greg_casamento@yahoo.com>
* Documentation/Gorm.texi: Correction of itemize bullet, error

View file

@ -2365,8 +2365,14 @@ static NSImage *classesImage = nil;
{
[self openEditorForObject: [p editedObject]];
}
[e orderFront];
[[e window] makeKeyAndOrderFront: self];
// prevent bringing front of menus before they've been properly sized.
if([anObject isKindOfClass: [NSMenu class]] == NO)
{
[e orderFront];
[[e window] makeKeyAndOrderFront: self];
}
return e;
}
@ -3094,7 +3100,8 @@ static NSImage *classesImage = nil;
{
[obj orderOut: self];
}
else if ([obj isKindOfClass: [NSMenu class]] == YES)
else if ([obj isKindOfClass: [NSMenu class]] == YES &&
[[self nameForObject: obj] isEqual: @"NSMenu"] == YES)
{
[obj close];
}

View file

@ -134,6 +134,15 @@
{
return @"NSMenu";
}
#ifdef DEBUG
// This method is purely for debugging purposes...
- (void) display
{
NSLog(@"In GormNSMenu display...");
[super display];
}
#endif
@end
@implementation NSMenu (GormNSMenu)