mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Declaration
for NSIBHelpConnector ivars and methods. * Source/GSNibCompatibility.m: Implemented NSIBHelpConnector. * Source/NSBundleAdditions.m: Added check to initWithCoder so that values aren't decoded, if there's no value in the coder. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23784 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0e6b15b3e9
commit
b6d305f622
4 changed files with 104 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-10-07 10:02-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Declaration
|
||||
for NSIBHelpConnector ivars and methods.
|
||||
* Source/GSNibCompatibility.m: Implemented NSIBHelpConnector.
|
||||
* Source/NSBundleAdditions.m: Added check to initWithCoder so that
|
||||
values aren't decoded, if there's no value in the coder.
|
||||
|
||||
2006-10-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSToolTips.h: Remove some ivars
|
||||
|
|
|
@ -80,8 +80,15 @@ typedef struct _GSWindowTemplateFlags
|
|||
|
||||
// help connector class...
|
||||
@interface NSIBHelpConnector : NSNibConnector
|
||||
{
|
||||
id _marker;
|
||||
id _file;
|
||||
}
|
||||
- (void) setFile: (id)file;
|
||||
- (id) file;
|
||||
- (void) setMarker: (id)file;
|
||||
- (id) marker;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Button image source class.
|
||||
*/
|
||||
|
|
|
@ -1477,6 +1477,70 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@end
|
||||
|
||||
@implementation NSIBHelpConnector
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if((self = [super initWithCoder: coder]) != nil)
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
{
|
||||
if([coder containsValueForKey: @"NSFile"])
|
||||
{
|
||||
_file = RETAIN([coder decodeObjectForKey: @"NSFile"]);
|
||||
}
|
||||
if([coder containsValueForKey: @"NSMarker"])
|
||||
{
|
||||
_marker = RETAIN([coder decodeObjectForKey: @"NSMarker"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_file = RETAIN([coder decodeObject]);
|
||||
_marker = RETAIN([coder decodeObject]);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
[super encodeWithCoder: coder];
|
||||
if([coder allowsKeyedCoding])
|
||||
{
|
||||
if(_file != nil)
|
||||
{
|
||||
[coder encodeObject: _file forKey: @"NSFile"];
|
||||
}
|
||||
if(_marker != nil)
|
||||
{
|
||||
[coder encodeObject: _file forKey: @"NSMarker"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[coder encodeObject: _file];
|
||||
[coder encodeObject: _marker];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setFile: (id)file
|
||||
{
|
||||
ASSIGN(_file, file);
|
||||
}
|
||||
|
||||
- (id) file
|
||||
{
|
||||
return _file;
|
||||
}
|
||||
|
||||
- (void) setMarker: (id)marker
|
||||
{
|
||||
ASSIGN(_marker, marker);
|
||||
}
|
||||
|
||||
- (id) marker
|
||||
{
|
||||
return _marker;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface NSDecimalNumberPlaceholder : NSObject
|
||||
|
|
|
@ -72,9 +72,18 @@
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: _src forKey: @"NSSource"];
|
||||
[aCoder encodeObject: _dst forKey: @"NSDestination"];
|
||||
[aCoder encodeObject: _tag forKey: @"NSLabel"];
|
||||
if(_src != nil)
|
||||
{
|
||||
[aCoder encodeObject: _src forKey: @"NSSource"];
|
||||
}
|
||||
if(_dst != nil)
|
||||
{
|
||||
[aCoder encodeObject: _dst forKey: @"NSDestination"];
|
||||
}
|
||||
if(_tag != nil)
|
||||
{
|
||||
[aCoder encodeObject: _tag forKey: @"NSLabel"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -92,9 +101,18 @@
|
|||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
|
||||
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
|
||||
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
|
||||
if([aDecoder containsValueForKey: @"NSDestination"])
|
||||
{
|
||||
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
|
||||
}
|
||||
if([aDecoder containsValueForKey: @"NSSource"])
|
||||
{
|
||||
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
|
||||
}
|
||||
if([aDecoder containsValueForKey: @"NSLabel"])
|
||||
{
|
||||
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue