mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +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
fb34fc3820
commit
66db75610b
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>
|
2006-10-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/GSToolTips.h: Remove some ivars
|
* Source/GSToolTips.h: Remove some ivars
|
||||||
|
|
|
@ -80,8 +80,15 @@ typedef struct _GSWindowTemplateFlags
|
||||||
|
|
||||||
// help connector class...
|
// help connector class...
|
||||||
@interface NSIBHelpConnector : NSNibConnector
|
@interface NSIBHelpConnector : NSNibConnector
|
||||||
|
{
|
||||||
|
id _marker;
|
||||||
|
id _file;
|
||||||
|
}
|
||||||
|
- (void) setFile: (id)file;
|
||||||
|
- (id) file;
|
||||||
|
- (void) setMarker: (id)file;
|
||||||
|
- (id) marker;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button image source class.
|
* Button image source class.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1477,6 +1477,70 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation NSIBHelpConnector
|
@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
|
@end
|
||||||
|
|
||||||
@interface NSDecimalNumberPlaceholder : NSObject
|
@interface NSDecimalNumberPlaceholder : NSObject
|
||||||
|
|
|
@ -72,9 +72,18 @@
|
||||||
{
|
{
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: _src forKey: @"NSSource"];
|
if(_src != nil)
|
||||||
[aCoder encodeObject: _dst forKey: @"NSDestination"];
|
{
|
||||||
[aCoder encodeObject: _tag forKey: @"NSLabel"];
|
[aCoder encodeObject: _src forKey: @"NSSource"];
|
||||||
|
}
|
||||||
|
if(_dst != nil)
|
||||||
|
{
|
||||||
|
[aCoder encodeObject: _dst forKey: @"NSDestination"];
|
||||||
|
}
|
||||||
|
if(_tag != nil)
|
||||||
|
{
|
||||||
|
[aCoder encodeObject: _tag forKey: @"NSLabel"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -92,9 +101,18 @@
|
||||||
{
|
{
|
||||||
if ([aDecoder allowsKeyedCoding])
|
if ([aDecoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
|
if([aDecoder containsValueForKey: @"NSDestination"])
|
||||||
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
|
{
|
||||||
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
|
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
|
||||||
|
}
|
||||||
|
if([aDecoder containsValueForKey: @"NSSource"])
|
||||||
|
{
|
||||||
|
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
|
||||||
|
}
|
||||||
|
if([aDecoder containsValueForKey: @"NSLabel"])
|
||||||
|
{
|
||||||
|
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue