mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:17:39 +00:00
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:
parent
783d3d3ae8
commit
6bc07bc175
2 changed files with 20 additions and 3 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue