mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:40:38 +00:00
* 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:
parent
2886fd56a6
commit
32c4192f32
4 changed files with 19 additions and 116 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue