Reverted back to the change previously used for window inspection in Gorm. It seems as though using sendEvent: was causing too many problems. Overriding orderWindow:relativeTo: is an acceptable fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21527 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-07-24 15:15:52 +00:00
parent a568609f3c
commit b3e06f2c19
4 changed files with 37 additions and 70 deletions

View file

@ -1,9 +1,16 @@
2005-07-24 11:20 Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/1Windows/GormNSPanel.m
* Palettes/1Windows/GormNSWindow.m: Readded override of
orderWindow:relativeTo:. This corrects bug#13838.
2005-07-23 18:02 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormInspectorsManager.m: Remove extra revert: call.
* GormLib/IBInspector.m: Touch changes the inspector X to the broken
X, per specs.
* Gorm.m:
* Gorm.m: [Gorm testInterface] fix for menu disappearance when
testing the interface.
* Palettes/0Menus/main.m: Added to authors list.
2005-07-23 10:10 Gregory John Casamento <greg_casamento@yahoo.com>

6
Gorm.m
View file

@ -677,9 +677,13 @@
// so we don't get the warning...
[self setServicesMenu: nil];
[[self mainMenu] display];
[[NSApp mainWindow] orderFrontRegardless];
[[NSApp mainWindow] makeKeyAndOrderFront: self];
// we're now in testing mode.
[notifCenter postNotificationName: IBDidBeginTestingInterfaceNotification
object: self];
[NSApp unhide: self];
}
RELEASE(data);

View file

@ -110,44 +110,22 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
autoPositionMask = mask;
}
/*
- (void) sendEvent: (NSEvent*)theEvent
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
{
NSView *v;
NSEventType type;
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
[super orderWindow: place relativeTo: otherWin];
if([NSApp isConnecting] == NO)
{
id editor = [document editorForObject: self create: NO];
if (!_f.visible && [theEvent type] != NSAppKitDefined)
return;
if (!_f.cursor_rects_valid)
{
[self resetCursorRects];
}
type = [theEvent type];
switch (type)
{
case NSLeftMouseDown:
// select myself.
if([editor respondsToSelector: @selector(selectObjects:)])
{
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
if([NSApp isConnecting] == NO)
{
id editor = [document editorForObject: self create: NO];
// select myself.
if([editor respondsToSelector: @selector(selectObjects:)])
{
[editor selectObjects: [NSArray arrayWithObject: self]];
}
[document setSelectionFromEditor: editor];
[editor makeSelectionVisible: YES];
}
[editor selectObjects: [NSArray arrayWithObject: self]];
}
break;
}
[super sendEvent: theEvent];
[document setSelectionFromEditor: editor];
[editor makeSelectionVisible: YES];
}
}
*/
@end

View file

@ -132,44 +132,22 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
autoPositionMask = mask;
}
/*
- (void) sendEvent: (NSEvent*)theEvent
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
{
NSView *v;
NSEventType type;
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
[super orderWindow: place relativeTo: otherWin];
if([NSApp isConnecting] == NO)
{
id editor = [document editorForObject: self create: NO];
if (!_f.visible && [theEvent type] != NSAppKitDefined)
return;
if (!_f.cursor_rects_valid)
{
[self resetCursorRects];
}
type = [theEvent type];
switch (type)
{
case NSLeftMouseDown:
// select myself.
if([editor respondsToSelector: @selector(selectObjects:)])
{
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
if([NSApp isConnecting] == NO)
{
id editor = [document editorForObject: self create: NO];
// select myself.
if([editor respondsToSelector: @selector(selectObjects:)])
{
[editor selectObjects: [NSArray arrayWithObject: self]];
}
[document setSelectionFromEditor: editor];
[editor makeSelectionVisible: YES];
}
[editor selectObjects: [NSArray arrayWithObject: self]];
}
break;
}
[super sendEvent: theEvent];
[document setSelectionFromEditor: editor];
[editor makeSelectionVisible: YES];
}
}
*/
@end