Add keyed coding for print info.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33290 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-06-13 14:45:41 +00:00
parent 783d3d3ae8
commit 6bc07bc175
2 changed files with 20 additions and 3 deletions

View file

@ -486,7 +486,14 @@ static NSPrintInfo *sharedPrintInfo = nil;
[dict removeObjectForKey: NSPrintPrinter];
}
[aCoder encodePropertyList: dict];
if ([aCoder allowsKeyedCoding])
{
[aCoder encodeObject: dict forKey: @"NSAttributes"];
}
else
{
[aCoder encodePropertyList: dict];
}
RELEASE(dict);
}
@ -494,8 +501,14 @@ static NSPrintInfo *sharedPrintInfo = nil;
{
NSMutableDictionary *dict;
dict = [aDecoder decodePropertyList];
if ([aDecoder allowsKeyedCoding])
{
dict = [aDecoder decodeObjectForKey: @"NSAttributes"];
}
else
{
dict = [aDecoder decodePropertyList];
}
return [self initWithDictionary: dict];
}