Reformatted to comply to

coding standards


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16291 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wim 2003-03-30 12:48:06 +00:00
parent 41dd0eb117
commit c54322b748

View file

@ -1006,38 +1006,38 @@ static NSNotificationCenter *nc;
// Main // Main
oldWindowFrame = [_aWindow frame]; oldWindowFrame = [_aWindow frame];
newWindowFrame = [NSWindow frameRectForContentRect: menuFrame newWindowFrame = [NSWindow frameRectForContentRect: menuFrame
styleMask: [_aWindow styleMask]]; styleMask: [_aWindow styleMask]];
if (oldWindowFrame.size.height > 1) if (oldWindowFrame.size.height > 1)
{ {
newWindowFrame.origin = NSMakePoint (oldWindowFrame.origin.x, newWindowFrame.origin = NSMakePoint (oldWindowFrame.origin.x,
oldWindowFrame.origin.y oldWindowFrame.origin.y
+ oldWindowFrame.size.height + oldWindowFrame.size.height
- newWindowFrame.size.height); - newWindowFrame.size.height);
} }
[_aWindow setFrame: newWindowFrame display: NO]; [_aWindow setFrame: newWindowFrame display: NO];
// Transient // Transient
oldWindowFrame = [_bWindow frame]; oldWindowFrame = [_bWindow frame];
newWindowFrame = [NSWindow frameRectForContentRect: menuFrame newWindowFrame = [NSWindow frameRectForContentRect: menuFrame
styleMask: [_bWindow styleMask]]; styleMask: [_bWindow styleMask]];
if (oldWindowFrame.size.height > 1) if (oldWindowFrame.size.height > 1)
{ {
newWindowFrame.origin = NSMakePoint (oldWindowFrame.origin.x, newWindowFrame.origin = NSMakePoint (oldWindowFrame.origin.x,
oldWindowFrame.origin.y oldWindowFrame.origin.y
+ oldWindowFrame.size.height + oldWindowFrame.size.height
- newWindowFrame.size.height); - newWindowFrame.size.height);
} }
[_bWindow setFrame: newWindowFrame display: NO]; [_bWindow setFrame: newWindowFrame display: NO];
if (_popUpButtonCell == nil) if (_popUpButtonCell == nil)
{ {
[_view setFrameOrigin: NSMakePoint (0, 0)]; [_view setFrameOrigin: NSMakePoint (0, 0)];
} }
[_view setNeedsDisplay: YES]; [_view setNeedsDisplay: YES];
_changed = NO; _changed = NO;
} }
@ -1226,14 +1226,14 @@ static NSNotificationCenter *nc;
if (_transient) if (_transient)
{ {
NSDebugLLog (@"NSMenu", NSDebugLLog (@"NSMenu",
@"trying to display while alreay displayed transient"); @"trying to display while alreay displayed transient");
} }
if (_changed) if (_changed)
{ {
[self sizeToFit]; [self sizeToFit];
} }
if (_superMenu && ![self isTornOff]) if (_superMenu && ![self isTornOff])
{ {
// query super menu for position // query super menu for position
@ -1241,15 +1241,15 @@ static NSNotificationCenter *nc;
_superMenu->_attachedMenu = self; _superMenu->_attachedMenu = self;
} }
else if ([_aWindow frame].origin.y <= 0 else if ([_aWindow frame].origin.y <= 0
&& _popUpButtonCell == nil) // get geometry only if not set && _popUpButtonCell == nil) // get geometry only if not set
{ {
[self setGeometry]; [self setGeometry];
} }
NSDebugLLog (@"NSMenu", NSDebugLLog (@"NSMenu",
@"Display, origin: %@", @"Display, origin: %@",
NSStringFromPoint ([_aWindow frame].origin)); NSStringFromPoint ([_aWindow frame].origin));
[_aWindow orderFrontRegardless]; [_aWindow orderFrontRegardless];
} }
@ -1464,26 +1464,26 @@ static NSNotificationCenter *nc;
= -MIN (SHIFT_DELTA, NSMaxX (frameRect) - NSMaxX (screenRect) + 3); = -MIN (SHIFT_DELTA, NSMaxX (frameRect) - NSMaxX (screenRect) + 3);
moveIt = YES; moveIt = YES;
} }
if (moveIt) if (moveIt)
{ {
NSMenu *candidateMenu; NSMenu *candidateMenu;
NSMenu *masterMenu; NSMenu *masterMenu;
NSPoint masterLocation; NSPoint masterLocation;
NSPoint destinationPoint; NSPoint destinationPoint;
// Look for the "master" menu, i.e. the one to move from. // Look for the "master" menu, i.e. the one to move from.
for (candidateMenu = masterMenu = self; for (candidateMenu = masterMenu = self;
(candidateMenu = masterMenu->_superMenu) (candidateMenu = masterMenu->_superMenu)
&& (!masterMenu->_is_tornoff && (!masterMenu->_is_tornoff
|| masterMenu->_transient); || masterMenu->_transient);
masterMenu = candidateMenu); masterMenu = candidateMenu);
masterLocation = [[masterMenu window] frame].origin; masterLocation = [[masterMenu window] frame].origin;
destinationPoint.x = masterLocation.x + vector.x; destinationPoint.x = masterLocation.x + vector.x;
destinationPoint.y = masterLocation.y + vector.y; destinationPoint.y = masterLocation.y + vector.y;
[masterMenu nestedSetFrameOrigin: destinationPoint]; [masterMenu nestedSetFrameOrigin: destinationPoint];
} }
} }