mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
New patches
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4328 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dcd2e40b41
commit
37629d31fd
4 changed files with 66 additions and 7 deletions
|
@ -1209,11 +1209,14 @@ void __dummy_GMAppKit_functionForLinking() {}
|
|||
@"backingType"];
|
||||
unsigned styleMask = [unarchiver decodeUnsignedIntWithName:@"styleMask"];
|
||||
NSRect aRect = [unarchiver decodeRectWithName:@"frame"];
|
||||
NSSavePanel* panel = [[[NSSavePanel allocWithZone:[unarchiver objectZone]]
|
||||
// Use [self class] here instead of NSSavePanel so as to invoke
|
||||
// +allocWithZone on the correct (if any) sub-class
|
||||
NSSavePanel* panel = [[[[self class] allocWithZone:[unarchiver objectZone]]
|
||||
initWithContentRect:aRect
|
||||
styleMask:styleMask backing:backingType defer:YES]
|
||||
autorelease];
|
||||
|
||||
NSDebugLLog(@"NSSavePanel", @"NSSavePanel +createObjectForModelUnarchiver");
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
@ -1443,3 +1446,22 @@ void __dummy_GMAppKit_functionForLinking() {}
|
|||
|
||||
@end /* NSTextFieldCell (GMArchiverMethods) */
|
||||
|
||||
@implementation NSFormCell (GMArchiverMethods)
|
||||
|
||||
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
|
||||
{
|
||||
[super encodeWithModelArchiver:archiver];
|
||||
|
||||
[archiver encodeString:[self title] withName:@"title"];
|
||||
}
|
||||
|
||||
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver
|
||||
{
|
||||
self = [super initWithModelUnarchiver:unarchiver];
|
||||
|
||||
[self setTitle:[unarchiver decodeStringWithName:@"title"]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end /* NSFormCell (GMArchiverMethods) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue