diff --git a/Headers/gnustep/gui/GMAppKit.h b/Headers/gnustep/gui/GMAppKit.h index 176367dd4..d36ab9a93 100644 --- a/Headers/gnustep/gui/GMAppKit.h +++ b/Headers/gnustep/gui/GMAppKit.h @@ -27,7 +27,7 @@ #define _GNUstep_H_GMAppKit #include -#import +#import @interface NSApplication (GMArchiverMethods) @end diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index d821e9f05..d79bbc45b 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -25,7 +25,7 @@ #import #import -#include "AppKit/GMAppKit.h" +#include "gnustep/gui/GMAppKit.h" #ifndef AUTORELEASE #define AUTORELEASE(object) [object autorelease] @@ -965,12 +965,15 @@ void __dummy_GMAppKit_functionForLinking() {} [archiver encodeInt: [self autoresizingMask] withName: @"autoresizingMask"]; - /* OUCH! This code crashes the translator; probably we interfere somehow with - the way NSPopUpButton is handled by the NeXT's NIB code. Sorry, the - popup buttons cannot be handled by the convertor! */ -#ifdef __APPLE__ - NSLog(@"Cannot encode NSPopUpButton - please fix me"); - [archiver encodeArray: [NSArray array] withName: @"itemArray"]; +#if 0 //def __APPLE__ + { + int i; + NSMutableArray *array; + array = [NSMutableArray arrayWithCapacity: [self numberOfItems]]; + for (i = 0; i < [self numberOfItems]; i++) + [array addObject: [self itemAtIndex: i]]; + [archiver encodeArray: array withName: @"itemArray"]; + } #else [archiver encodeArray:[self itemArray] withName:@"itemArray"]; #endif diff --git a/Model/GMArchiver.m b/Model/GMArchiver.m index c4f35de23..d82d8e133 100644 --- a/Model/GMArchiver.m +++ b/Model/GMArchiver.m @@ -43,7 +43,7 @@ #define RETAIN(object) [object retain] #endif -#include +#include @interface GMClassInfo : NSObject { diff --git a/Model/GNUmakefile b/Model/GNUmakefile index 6417608f3..917f7431e 100644 --- a/Model/GNUmakefile +++ b/Model/GNUmakefile @@ -45,8 +45,8 @@ endif libgmodel_OBJC_FILES = IMCustomObject.m IMConnectors.m IMLoading.m GMAppKit.m \ GMArchiver.m -libgmodel_HEADER_FILES_DIR = ../Headers/AppKit -libgmodel_HEADER_FILES_INSTALL_DIR = /gnustep/AppKit +libgmodel_HEADER_FILES_DIR = ../Headers/gnustep/gui +libgmodel_HEADER_FILES_INSTALL_DIR = /gnustep/gui libgmodel_HEADER_FILES = IMConnectors.h IMCustomObject.h IMLoading.h \ GMAppKit.h GMArchiver.h diff --git a/Model/IBClasses.m b/Model/IBClasses.m index 29f3a1306..ecebd30af 100644 --- a/Model/IBClasses.m +++ b/Model/IBClasses.m @@ -28,7 +28,7 @@ #import #import #import -#import +#import #ifdef __APPLE__ #import @@ -39,7 +39,7 @@ #import "IBClasses.h" #import "Translator.h" #import "IMConnectors.h" -#import "AppKit/IMCustomObject.h" +#import "gnustep/gui/IMCustomObject.h" //#define DEBUG diff --git a/Model/IMConnectors.m b/Model/IMConnectors.m index f5894fbd6..ee5872d6a 100644 --- a/Model/IMConnectors.m +++ b/Model/IMConnectors.m @@ -25,11 +25,13 @@ #include +#ifndef NeXT_Foundation_LIBRARY #include +#endif #include #include -#include -#include "AppKit/IMCustomObject.h" +#include +#include "gnustep/gui/IMCustomObject.h" #include "IMConnectors.h" @implementation IMConnector @@ -69,6 +71,7 @@ // NSLog (@"%@: setting target to %@", _source, _destination); [_source setTarget:_destination]; } +#ifndef NeXT_Foundation_LIBRARY else { const char *type; @@ -78,14 +81,13 @@ /* * Use the GNUstep additional function to set the instance * variable directly. - * FIXME - need some way to do this for libFoundation and - * Foundation based systems. */ if (GSObjCFindVariable(_source, "target", &type, &size, &offset)) { GSObjCSetVariable(_source, offset, size, (void*)&_destination); } } +#endif if ([_source respondsToSelector:@selector(setAction:)]) { @@ -93,6 +95,7 @@ // _source, NSStringFromSelector(action)); [_source setAction:action]; } +#ifndef NeXT_Foundation_LIBRARY else { const char *type; @@ -110,6 +113,7 @@ GSObjCSetVariable(_source, offset, size, (void*)&action); } } +#endif } @end /* IMControlConnector:IMConnector */ @@ -148,6 +152,7 @@ { [_source performSelector:setSelector withObject:_destination]; } +#ifndef NeXT_Foundation_LIBRARY else { const char *nam = [label cString]; @@ -166,6 +171,7 @@ GSObjCSetVariable(_source, offset, size, (void*)&_destination); } } +#endif } @end /* IMOutletConnector */ diff --git a/Model/IMLoading.m b/Model/IMLoading.m index b64201ce3..6c1036bb5 100644 --- a/Model/IMLoading.m +++ b/Model/IMLoading.m @@ -28,9 +28,9 @@ #import #import -#include -#include "AppKit/IMLoading.h" -#include "AppKit/IMCustomObject.h" +#include "gnustep/gui/GMArchiver.h" +#include "gnustep/gui/IMLoading.h" +#include "gnustep/gui/IMCustomObject.h" /* For awakeFromNib */ #include