diff --git a/ChangeLog b/ChangeLog index 384fc57f6..9ee8f8e27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-06-14 Michael Hanni + + * Model/GMAppKit.m: Minor adjustments for MacOS-X so nib2model + works (mainly #ifdef'ing NSCStringText out if on __APPLE__). + * Model/IBClasses.m: NSIB* -> NSNib on __APPLE__. Some ivars + #ifedef'ed to new names if on __APPLE__. + * Model/IMLoading.m: makeObjectsPerformSelector on __APPLE__. + * Headers/GMAppKit.h: #ifdef'ed out NSCStringText on __APPLE__. + + With these changes nib2gmodel works on MacOSX-Server machines. + Sat Jun 12 9:35:00 1999 Richard Frith-Macdonald * Source/NSResponder.m: Update encoding/decoding for interface styles diff --git a/Headers/gnustep/gui/GMAppKit.h b/Headers/gnustep/gui/GMAppKit.h index 923da2f25..1d5d3fdc7 100644 --- a/Headers/gnustep/gui/GMAppKit.h +++ b/Headers/gnustep/gui/GMAppKit.h @@ -50,8 +50,10 @@ @interface NSControl (GMArchiverMethods) @end +#ifndef __APPLE__ /* On MacOSX NSCStringText is depricated. */ @interface NSCStringText (GMArchiverMethods) @end +#endif @interface NSFont (GMArchiverMethods) @end diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index 19497d226..11f012d03 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -620,7 +620,7 @@ void __dummy_GMAppKit_functionForLinking() {} @end /* NSControl (GMArchiverMethods) */ - +#ifndef __APPLE__ @implementation NSCStringText (GMArchiverMethods) - (void)encodeWithModelArchiver:(GMArchiver*)archiver @@ -634,7 +634,7 @@ void __dummy_GMAppKit_functionForLinking() {} } @end /* NSCStringText (GMArchiverMethods) */ - +#endif @implementation NSFont (GMArchiverMethods) diff --git a/Model/IBClasses.m b/Model/IBClasses.m index ea5467e59..d292aa367 100644 --- a/Model/IBClasses.m +++ b/Model/IBClasses.m @@ -29,6 +29,13 @@ #import #import #import + +#ifdef __APPLE__ +#import +#import +#import +#endif + #import "IBClasses.h" #import "Translator.h" #import "IMConnectors.h" @@ -114,8 +121,11 @@ @end - +#ifdef __APPLE__ +@implementation NSNibConnector (NibToGModel) +#else @implementation NSIBConnector (NibToGModel) +#endif - (id)awakeAfterUsingCoder:(NSCoder*)aDecoder { #ifdef DEBUG @@ -123,18 +133,31 @@ self, NSStringFromClass(isa), source, destination, label); #endif +#ifdef __APPLE__ + [_source retain]; + [_destination retain]; + [_label retain]; +#else [source retain]; [destination retain]; [label retain]; +#endif + [connections addObject:self]; return self; } - (void)encodeWithModelArchiver:(GMArchiver*)archiver { +#ifdef __APPLE__ + [archiver encodeObject:_source withName:@"source"]; + [archiver encodeObject:_destination withName:@"destination"]; + [archiver encodeObject:_label withName:@"label"]; +#else [archiver encodeObject:source withName:@"source"]; [archiver encodeObject:destination withName:@"destination"]; [archiver encodeObject:label withName:@"label"]; +#endif } - (Class)classForModelArchiver @@ -144,8 +167,11 @@ @end /* NSIBConnector */ - +#ifdef __APPLE__ +@implementation NSNibOutletConnector (NibToGModel) +#else @implementation NSIBOutletConnector (NibToGModel) +#endif - (void)establishConnection { } @@ -157,8 +183,11 @@ @end /* NSIBOutletConnector */ - +#ifdef __APPLE__ +@implementation NSNibControlConnector (NibToGModel) +#else @implementation NSIBControlConnector (NibToGModel) +#endif - (void)establishConnection { } diff --git a/Model/IMLoading.m b/Model/IMLoading.m index 8dfa58788..8207eb012 100644 --- a/Model/IMLoading.m +++ b/Model/IMLoading.m @@ -124,7 +124,11 @@ BOOL _fileOwnerDecoded = NO; { int i, count; +#ifdef __APPLE__ + [connections makeObjectsPerformSelector:@selector(establishConnection)]; +#else [connections makeObjectsPerform:@selector(establishConnection)]; +#endif /* Send the -awakeFromModel method */ for (i = 0, count = [objects count]; i < count; i++) { diff --git a/Source/NSFontPanel.m b/Source/NSFontPanel.m index df70814a4..d48d81ad7 100644 --- a/Source/NSFontPanel.m +++ b/Source/NSFontPanel.m @@ -133,7 +133,7 @@ [label setEditable:NO]; [label setDrawsBackground:YES]; [label setTextColor:[NSColor whiteColor]]; - [label setBackgroundColor:[NSColor darkGrayColor]]; + [label setBackgroundColor:[NSColor colorWithCalibratedWhite:NSDarkGray alpha: 1.0]]; [bottomSplit addSubview:label]; [label release];