mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Set the icon of the file wrapper to the image.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29223 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
212696a5f8
commit
8d53fe7507
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-01-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* TextConverters/RTF/RTFConsumer.m (RTFDConsumer-appendImage:):
|
||||
Set the icon of the file wrapper to the image.
|
||||
|
||||
2010-01-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* TextConverters/RTF/RTFConsumer.m (-parseRTF:...class:): Try to
|
||||
|
|
|
@ -451,13 +451,16 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c)
|
|||
if (wrapper != nil)
|
||||
{
|
||||
NSImage* image = [[NSImage alloc] initWithData: [wrapper regularFileContents]];
|
||||
NSTextAttachmentCell* attachedCell = [[NSTextAttachmentCell alloc] initImageCell: image];
|
||||
NSTextAttachment* attachment = [[NSTextAttachment alloc] initWithFileWrapper: wrapper];
|
||||
NSTextAttachment* attachment;
|
||||
RTFAttribute* attr = [self attr];
|
||||
NSMutableDictionary* attributes = nil;
|
||||
NSMutableAttributedString* str = nil;
|
||||
|
||||
[attachment setAttachmentCell: attachedCell];
|
||||
if (image != nil)
|
||||
{
|
||||
[wrapper setIcon: image];
|
||||
}
|
||||
attachment = [[NSTextAttachment alloc] initWithFileWrapper: wrapper];
|
||||
|
||||
attributes = [[NSMutableDictionary alloc]
|
||||
initWithObjectsAndKeys:
|
||||
|
@ -474,7 +477,6 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c)
|
|||
|
||||
RELEASE(attributes);
|
||||
RELEASE(attachment);
|
||||
RELEASE(attachedCell);
|
||||
RELEASE(image);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue