mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-03 15:20:42 +00:00
Small changes found by static analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32434 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fed6ff1796
commit
895bea4b23
3 changed files with 9 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2011-03-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSImage.m: Remove the -awakeAfterUsingCoder: method as
|
||||||
|
this method was incorrectly implemented and
|
||||||
|
* Source/NSTextAttachment.m (NSTextAttachmentCell-setAttachment:):
|
||||||
|
Release the created icon after setting it as image.
|
||||||
|
|
||||||
2011-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSBitmapImageRep.m:
|
* Source/NSBitmapImageRep.m:
|
||||||
|
|
|
@ -1823,16 +1823,6 @@ Fallback for backends other than Cairo. */
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder
|
|
||||||
{
|
|
||||||
if (_name && [nameDict objectForKey: _name])
|
|
||||||
{
|
|
||||||
return [nameDict objectForKey: _name];
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (BOOL) canInitWithPasteboard: (NSPasteboard *)pasteboard
|
+ (BOOL) canInitWithPasteboard: (NSPasteboard *)pasteboard
|
||||||
{
|
{
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
|
@ -251,9 +251,10 @@
|
||||||
icon = [[NSImage alloc] initByReferencingFile: fileName];
|
icon = [[NSImage alloc] initByReferencingFile: fileName];
|
||||||
}
|
}
|
||||||
if (icon == nil)
|
if (icon == nil)
|
||||||
icon = [fileWrap icon];
|
icon = RETAIN([fileWrap icon]);
|
||||||
|
|
||||||
[self setImage: icon];
|
[self setImage: icon];
|
||||||
|
RELEASE(icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue