mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 19:01:05 +00:00
nib2gmodel on MacOSX patches.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e83e2f7d90
commit
d0b2bf42c6
6 changed files with 52 additions and 6 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
1999-06-14 Michael Hanni <mhanni@sprintmail.com>
|
||||||
|
|
||||||
|
* 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 <richard@brainstorm.co.uk>
|
Sat Jun 12 9:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSResponder.m: Update encoding/decoding for interface styles
|
* Source/NSResponder.m: Update encoding/decoding for interface styles
|
||||||
|
|
|
@ -50,8 +50,10 @@
|
||||||
@interface NSControl (GMArchiverMethods) <ModelCoding>
|
@interface NSControl (GMArchiverMethods) <ModelCoding>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifndef __APPLE__ /* On MacOSX NSCStringText is depricated. */
|
||||||
@interface NSCStringText (GMArchiverMethods) <ModelCoding>
|
@interface NSCStringText (GMArchiverMethods) <ModelCoding>
|
||||||
@end
|
@end
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface NSFont (GMArchiverMethods) <ModelCoding>
|
@interface NSFont (GMArchiverMethods) <ModelCoding>
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -620,7 +620,7 @@ void __dummy_GMAppKit_functionForLinking() {}
|
||||||
|
|
||||||
@end /* NSControl (GMArchiverMethods) */
|
@end /* NSControl (GMArchiverMethods) */
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
@implementation NSCStringText (GMArchiverMethods)
|
@implementation NSCStringText (GMArchiverMethods)
|
||||||
|
|
||||||
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
|
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
|
||||||
|
@ -634,7 +634,7 @@ void __dummy_GMAppKit_functionForLinking() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end /* NSCStringText (GMArchiverMethods) */
|
@end /* NSCStringText (GMArchiverMethods) */
|
||||||
|
#endif
|
||||||
|
|
||||||
@implementation NSFont (GMArchiverMethods)
|
@implementation NSFont (GMArchiverMethods)
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,13 @@
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#import <AppKit/GMArchiver.h>
|
#import <AppKit/GMArchiver.h>
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#import <AppKit/NSNibConnector.h>
|
||||||
|
#import <AppKit/NSNibOutletConnector.h>
|
||||||
|
#import <AppKit/NSNibControlConnector.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#import "IBClasses.h"
|
#import "IBClasses.h"
|
||||||
#import "Translator.h"
|
#import "Translator.h"
|
||||||
#import "IMConnectors.h"
|
#import "IMConnectors.h"
|
||||||
|
@ -114,8 +121,11 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
@implementation NSNibConnector (NibToGModel)
|
||||||
|
#else
|
||||||
@implementation NSIBConnector (NibToGModel)
|
@implementation NSIBConnector (NibToGModel)
|
||||||
|
#endif
|
||||||
- (id)awakeAfterUsingCoder:(NSCoder*)aDecoder
|
- (id)awakeAfterUsingCoder:(NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -123,18 +133,31 @@
|
||||||
self, NSStringFromClass(isa), source, destination, label);
|
self, NSStringFromClass(isa), source, destination, label);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
[_source retain];
|
||||||
|
[_destination retain];
|
||||||
|
[_label retain];
|
||||||
|
#else
|
||||||
[source retain];
|
[source retain];
|
||||||
[destination retain];
|
[destination retain];
|
||||||
[label retain];
|
[label retain];
|
||||||
|
#endif
|
||||||
|
|
||||||
[connections addObject:self];
|
[connections addObject:self];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)encodeWithModelArchiver:(GMArchiver*)archiver
|
- (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:source withName:@"source"];
|
||||||
[archiver encodeObject:destination withName:@"destination"];
|
[archiver encodeObject:destination withName:@"destination"];
|
||||||
[archiver encodeObject:label withName:@"label"];
|
[archiver encodeObject:label withName:@"label"];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (Class)classForModelArchiver
|
- (Class)classForModelArchiver
|
||||||
|
@ -144,8 +167,11 @@
|
||||||
|
|
||||||
@end /* NSIBConnector */
|
@end /* NSIBConnector */
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
@implementation NSNibOutletConnector (NibToGModel)
|
||||||
|
#else
|
||||||
@implementation NSIBOutletConnector (NibToGModel)
|
@implementation NSIBOutletConnector (NibToGModel)
|
||||||
|
#endif
|
||||||
- (void)establishConnection
|
- (void)establishConnection
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -157,8 +183,11 @@
|
||||||
|
|
||||||
@end /* NSIBOutletConnector */
|
@end /* NSIBOutletConnector */
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
@implementation NSNibControlConnector (NibToGModel)
|
||||||
|
#else
|
||||||
@implementation NSIBControlConnector (NibToGModel)
|
@implementation NSIBControlConnector (NibToGModel)
|
||||||
|
#endif
|
||||||
- (void)establishConnection
|
- (void)establishConnection
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,11 @@ BOOL _fileOwnerDecoded = NO;
|
||||||
{
|
{
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
[connections makeObjectsPerformSelector:@selector(establishConnection)];
|
||||||
|
#else
|
||||||
[connections makeObjectsPerform:@selector(establishConnection)];
|
[connections makeObjectsPerform:@selector(establishConnection)];
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Send the -awakeFromModel method */
|
/* Send the -awakeFromModel method */
|
||||||
for (i = 0, count = [objects count]; i < count; i++) {
|
for (i = 0, count = [objects count]; i < count; i++) {
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
[label setEditable:NO];
|
[label setEditable:NO];
|
||||||
[label setDrawsBackground:YES];
|
[label setDrawsBackground:YES];
|
||||||
[label setTextColor:[NSColor whiteColor]];
|
[label setTextColor:[NSColor whiteColor]];
|
||||||
[label setBackgroundColor:[NSColor darkGrayColor]];
|
[label setBackgroundColor:[NSColor colorWithCalibratedWhite:NSDarkGray alpha: 1.0]];
|
||||||
[bottomSplit addSubview:label];
|
[bottomSplit addSubview:label];
|
||||||
[label release];
|
[label release];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue