mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:50:48 +00:00
Tidyup - make new method public
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6247 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7b00766409
commit
3a723df362
4 changed files with 196 additions and 107 deletions
|
@ -201,25 +201,29 @@ static Class rulerViewClass = nil;
|
|||
if ([aView isKindOfClass: [NSView class]] == NO)
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Attempt to set non-view object as content view"];
|
||||
ASSIGN((id)_contentView, (id)aView);
|
||||
[self addSubview: _contentView];
|
||||
if (aView != _contentView)
|
||||
{
|
||||
RETAIN(aView);
|
||||
[_contentView removeFromSuperview];
|
||||
_contentView = aView;
|
||||
[self addSubview: _contentView];
|
||||
}
|
||||
[_contentView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||
[self tile];
|
||||
}
|
||||
|
||||
- (void) _removeSubview: (NSView*)aView
|
||||
- (void) removeSubview: (NSView*)aView
|
||||
{
|
||||
if (aView == _contentView)
|
||||
{
|
||||
RETAIN(aView);
|
||||
_contentView = nil;
|
||||
[super _removeSubview: aView];
|
||||
[super removeSubview: aView];
|
||||
RELEASE(aView);
|
||||
[self tile];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super _removeSubview: aView];
|
||||
[super removeSubview: aView];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue