Additional changes from NibCompatibility.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22960 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2006-05-20 22:25:54 +00:00
parent d68950d71a
commit ae6072d62f
3 changed files with 30 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-05-20 18:25 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m
* Source/NSButtonCell.m: Merged additional changes from
NibCompatibility.
2006-05-20 18:11 Gregory John Casamento <greg_casamento@yahoo.com>
* ChangeLog

View file

@ -48,6 +48,7 @@
#include <Foundation/NSKeyedArchiver.h>
#include "AppKit/AppKit.h"
#include <GNUstepBase/GSObjCRuntime.h>
#include <GNUstepBase/GSIArray.h>
#include <GNUstepGUI/GSNibCompatibility.h>
#include <GNUstepGUI/GSInstantiator.h>
@ -687,6 +688,28 @@
- (BOOL) replaceObject: (id)oldObj withObject: (id)newObj;
@end
@implementation NSKeyedUnarchiver (NSClassSwapperPrivate)
- (BOOL) replaceObject: (id)oldObj withObject: (id)newObj
{
unsigned int i = 0;
unsigned int count = GSIArrayCount(_objMap);
for(i = 0; i < count; i++)
{
id obj = GSIArrayItemAtIndex(_objMap, i).obj;
if(obj == oldObj)
break;
}
if(i < count)
{
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)newObj, i);
return YES;
}
return NO;
}
@end
@implementation NSClassSwapper
- (void) setTemplate: (id)temp
{

View file

@ -75,8 +75,7 @@ typedef struct _GSButtonCellFlags
unsigned int hasKeyEquiv:1;
unsigned int lastState:1;
unsigned int isTransparent:1;
unsigned int inset:2
unsigned int unused2:4; // doesn't dim:1 gradient:3
unsigned int unused2:6; // inset:2 doesn't dim:1 gradient:3
unsigned int useButtonImageSource:1;
unsigned int unused3:8; // alt mnemonic loc.
#else