* Source/GSNibLoading.m: use the new code committed to NSMenu to

lay out the menu when vertical.  Get rid of the duplicate code here.
	* Source/NSDrawer.m: set the child window position when opening.
	* Source/NSMatrix.m: -_selectCell:atRow:column: Check to make 
	sure the selectedRow and selectedColumn are > -1.  This check is 
	done elsewhere and was not done here.  This was causing a crash.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27907 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-02-18 04:04:13 +00:00
parent 2886fd56a6
commit 32c4192f32
4 changed files with 19 additions and 116 deletions

View file

@ -235,8 +235,11 @@ static NSNotificationCenter *nc = nil;
- (void) openOnEdge
{
[self orderFront: self];
NSRect frame = [self frameFromParentWindowFrame];
[self setFrame: frame display: YES];
[self slide];
[self orderFront: self];
[self startTimer];
}
@ -263,6 +266,7 @@ static NSNotificationCenter *nc = nil;
NSRectEdge edge = [_drawer preferredEdge];
NSSize size = [_drawer maxContentSize];
[super setParentWindow: nil];
if (edge == NSMinXEdge) // left
{
frame.origin.x -= size.width;
@ -283,6 +287,7 @@ static NSNotificationCenter *nc = nil;
frame.origin.y += size.height;
[self setFrame: frame display: YES];
}
[super setParentWindow: _parentWindow];
}
- (void) _resetWindowPosition
@ -295,7 +300,7 @@ static NSNotificationCenter *nc = nil;
{
NSRect frame = [_parentWindow frame];
[self _resetWindowPosition];
[_parentWindow setFrame: frame display: YES];
// [_parentWindow setFrame: frame display: YES];
}
- (void) handleWindowClose: (NSNotification *)notification
@ -319,6 +324,7 @@ static NSNotificationCenter *nc = nil;
{
if (_parentWindow != window)
{
[super setParentWindow: window];
ASSIGN(_parentWindow, window);
[nc removeObserver: self];