mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 16:20:46 +00:00
Correct retain/release issues in NSScrollView and NSWindowController.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26799 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6b3d9536fd
commit
2505d01c74
3 changed files with 25 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-08-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSScrollView.m (-initWithCoder:): Handle non-retained
|
||||
ivars correctly.
|
||||
* Source/NSWindowController.m (-loadWindow): Release the loaded
|
||||
window once, as it got retained by the NIB loading mechanism.
|
||||
|
||||
2008-07-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSGlyphGenerator.m (-generateGlyphsForGlyphStorage:...):
|
||||
|
|
|
@ -254,6 +254,14 @@ static float scrollerWidth;
|
|||
{
|
||||
_contentView = nil;
|
||||
}
|
||||
if (aView == _headerClipView)
|
||||
{
|
||||
_headerClipView = nil;
|
||||
}
|
||||
if (aView == _cornerView)
|
||||
{
|
||||
_cornerView = nil;
|
||||
}
|
||||
[super removeSubview: aView];
|
||||
}
|
||||
|
||||
|
@ -1511,12 +1519,7 @@ static float scrollerWidth;
|
|||
[content setFrame: frame];
|
||||
}
|
||||
|
||||
// FIXME: No idea what is going on here.
|
||||
// retain the view and reset the content view...
|
||||
RETAIN(content);
|
||||
[self setContentView: content];
|
||||
RELEASE(content);
|
||||
ASSIGN(_contentView, content);
|
||||
}
|
||||
|
||||
if (hScroller != nil && _hasHorizScroller)
|
||||
|
@ -1533,8 +1536,7 @@ static float scrollerWidth;
|
|||
{
|
||||
_hasHeaderView = YES;
|
||||
_hasCornerView = YES;
|
||||
ASSIGN(_headerClipView,
|
||||
[aDecoder decodeObjectForKey: @"NSHeaderClipView"]);
|
||||
_headerClipView = [aDecoder decodeObjectForKey: @"NSHeaderClipView"];
|
||||
}
|
||||
|
||||
[self tile];
|
||||
|
@ -1543,7 +1545,7 @@ static float scrollerWidth;
|
|||
{
|
||||
int version = [aDecoder versionForClassName: @"NSScrollView"];
|
||||
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_contentView];
|
||||
_contentView = [aDecoder decodeObject];
|
||||
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
|
||||
|
@ -1572,7 +1574,7 @@ static float scrollerWidth;
|
|||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHeaderView];
|
||||
if (_hasHeaderView)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_headerClipView];
|
||||
_headerClipView = [aDecoder decodeObject];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasCornerView];
|
||||
}
|
||||
|
|
|
@ -444,8 +444,13 @@
|
|||
|
||||
if (_window == nil && _document != nil && _owner == _document)
|
||||
{
|
||||
[self setWindow: [_document _transferWindowOwnership]];
|
||||
}
|
||||
[self setWindow: [_document _transferWindowOwnership]];
|
||||
}
|
||||
else
|
||||
{
|
||||
// The window was already retained by the NIB loading.
|
||||
RELEASE(_window);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue