mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 22:00:58 +00:00
* Source/NSTextView.m: initWithCoder: change to use text storage
more directly to allow the handling of attributed strings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1c6132043d
commit
423d1f0826
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-08-08 13:06-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSTextView.m: initWithCoder: change to use text storage
|
||||||
|
more directly to allow the handling of attributed strings.
|
||||||
|
|
||||||
2009-08-08 03:06-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
2009-08-08 03:06-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Source/GSTextStorage.m: In initWithCoder: don't overwrite the
|
* Source/GSTextStorage.m: In initWithCoder: don't overwrite the
|
||||||
|
|
|
@ -785,7 +785,7 @@ that makes decoding and encoding compatible with the old code.
|
||||||
self = [super initWithCoder: aDecoder];
|
self = [super initWithCoder: aDecoder];
|
||||||
if ([aDecoder allowsKeyedCoding])
|
if ([aDecoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
NSString *textString = @"";
|
id textString = nil;
|
||||||
if ([aDecoder containsValueForKey: @"NSDelegate"])
|
if ([aDecoder containsValueForKey: @"NSDelegate"])
|
||||||
{
|
{
|
||||||
[self setDelegate: [aDecoder decodeObjectForKey: @"NSDelegate"]];
|
[self setDelegate: [aDecoder decodeObjectForKey: @"NSDelegate"]];
|
||||||
|
@ -851,8 +851,8 @@ that makes decoding and encoding compatible with the old code.
|
||||||
{
|
{
|
||||||
NSTextContainer *container = [aDecoder decodeObjectForKey: @"NSTextContainer"];
|
NSTextContainer *container = [aDecoder decodeObjectForKey: @"NSTextContainer"];
|
||||||
GSLayoutManager *lm = [container layoutManager];
|
GSLayoutManager *lm = [container layoutManager];
|
||||||
NSTextStorage *ts = [lm textStorage];
|
textString = [lm textStorage];
|
||||||
textString = [ts string];
|
[self setRichText: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up the text network...
|
// set up the text network...
|
||||||
|
@ -874,7 +874,7 @@ that makes decoding and encoding compatible with the old code.
|
||||||
[aDecoder decodeIntForKey: @"NSTVFlags"];
|
[aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self setString: textString];
|
[self insertText: textString];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue